Access.2007.VBA.Bibl..

(John Hannent) #1
rst.MoveFirst
rst.Edit
rst![BackupChoice] = strBackupChoice
rst![BackupPath] = strBackupPath
rst.Update
rst.Close

On Error Resume Next

Copy the zstblBackupInfo table to the calling database, if needed:


strCallingDb = CurrentDb.Name
strTable = “zstblBackupInfo”
Set tdfsCalling = dbsCalling.TableDefs
Set tdfCalling = tdfsCalling(strTable)
If tdfCalling Is Nothing Then
Debug.Print strTable & “ not found; about to copy it”
DoCmd.CopyObject destinationdatabase:=strCallingDb, _
newname:=strTable, _
sourceobjectType:=acTable, _
sourceobjectname:=strTable
Debug.Print “Copied “ & strTable
End If

Open the dialog form for selecting options:


strForm = “fdlgSetExtrasOptions”
DoCmd.OpenForm FormName:=strForm, _
view:=acNormal, _
windowmode:=acDialog

ErrorHandlerExit:
Exit Function

ErrorHandler:
MsgBox “Error No: “ & err.Number _
& “; Description: “ & err.Description
Resume ErrorHandlerExit

End Function

Public Function CopyListObjects()
‘Called from listTableFields() and ListQueryFields()

On Error Resume Next

Dim ctr As DAO.Container
Dim doc As DAO.Document

Creating Access Add-ins 14

Free download pdf