D
Dan
I have a Form to gather information into a Table and have placed a CheckBox
next to certain fields to have current data automatically populate the
newrecord fields when desired and have placed code in the New Record Button
and everything works just fine. (The checkboxes are not bounded to
tabledata, only on the form)
I'm just wondering if there was a better way for me to do this.
Dim CopyFile, CopySrc, CopyLoc, CopyBde, CopyCont As String
Dim CopySP, CopyMA, CopyMS, CopyBFS, CopyFB As String
CopyFile = Me.Source_File
CopySrc = Me.Source
CopyLoc = Me.Location
CopyBde = Me.Brigade
CopyCont = Me.Contractor
CopySP = Me.Service_Providers
CopyMA = Me.Mission_Area
CopyMS = Me.Mission_Set
CopyBFS = Me.Broad_Focus_Area
CopyFB = Me.Function_Bucket
DoCmd.RunCommand acCmdRecordsGoToNew
If Me.Check34 = True Then
Me.Source_File = CopyFile
End If
If Me.Check36 = True Then
Me.Source = CopySrc
End If
If Me.Check37 = True Then
Me.Location = CopyLoc
End If
If Me.Check38 = True Then
Me.Brigade = CopyBde
End If
If Me.Check39 = True Then
Me.Contractor = CopyCont
End If
If Me.Check40 = True Then
Me.Service_Providers = CopySP
End If
If Me.Check41 = True Then
Me.Mission_Area = CopyMA
End If
If Me.Check42 = True Then
Me.Mission_Set = CopyMS
End If
If Me.Check43 = True Then
Me.Broad_Focus_Area = CopyBFS
End If
If Me.Check44 = True Then
Me.Function_Bucket = CopyFB
End If
Thanks
Dan
next to certain fields to have current data automatically populate the
newrecord fields when desired and have placed code in the New Record Button
and everything works just fine. (The checkboxes are not bounded to
tabledata, only on the form)
I'm just wondering if there was a better way for me to do this.
Dim CopyFile, CopySrc, CopyLoc, CopyBde, CopyCont As String
Dim CopySP, CopyMA, CopyMS, CopyBFS, CopyFB As String
CopyFile = Me.Source_File
CopySrc = Me.Source
CopyLoc = Me.Location
CopyBde = Me.Brigade
CopyCont = Me.Contractor
CopySP = Me.Service_Providers
CopyMA = Me.Mission_Area
CopyMS = Me.Mission_Set
CopyBFS = Me.Broad_Focus_Area
CopyFB = Me.Function_Bucket
DoCmd.RunCommand acCmdRecordsGoToNew
If Me.Check34 = True Then
Me.Source_File = CopyFile
End If
If Me.Check36 = True Then
Me.Source = CopySrc
End If
If Me.Check37 = True Then
Me.Location = CopyLoc
End If
If Me.Check38 = True Then
Me.Brigade = CopyBde
End If
If Me.Check39 = True Then
Me.Contractor = CopyCont
End If
If Me.Check40 = True Then
Me.Service_Providers = CopySP
End If
If Me.Check41 = True Then
Me.Mission_Area = CopyMA
End If
If Me.Check42 = True Then
Me.Mission_Set = CopyMS
End If
If Me.Check43 = True Then
Me.Broad_Focus_Area = CopyBFS
End If
If Me.Check44 = True Then
Me.Function_Bucket = CopyFB
End If
Thanks
Dan