C
Confused
I need assistance with the proper syntax for auto-filling the id field on one
form coming from the id field of another form. I believe the function I need
to use is Dlast. Here is the situation. I have several tables which are all
related on the ID field. In the TblIssues (My main table) the ID field is an
autonumber. All my tables have separate forms created. The FrmIssues (the
main form) has a combo box which depending on the selection will open the
appropriate accompanying form. The coding is as follows:
Private Sub Combo22_Change()
DoCmd.RunCommand acCmdSaveRecord
If (Forms!FrmIssues!Combo22 = "Ordering") Then
DoCmd.OpenForm "FrmOrder", acNormal, "", "", , acNormal
End If
If (Forms!FrmIssues!Combo22 = "Service Call") Then
DoCmd.OpenForm "FrmServiceCall", acNormal, "", "", , acNormal
End If
End Sub
What I need is when the accompanying form opens have the ID field on the
form populate automatically with the record ID from the main form so the new
records will be linked.
Any help is greatly appreciated!
form coming from the id field of another form. I believe the function I need
to use is Dlast. Here is the situation. I have several tables which are all
related on the ID field. In the TblIssues (My main table) the ID field is an
autonumber. All my tables have separate forms created. The FrmIssues (the
main form) has a combo box which depending on the selection will open the
appropriate accompanying form. The coding is as follows:
Private Sub Combo22_Change()
DoCmd.RunCommand acCmdSaveRecord
If (Forms!FrmIssues!Combo22 = "Ordering") Then
DoCmd.OpenForm "FrmOrder", acNormal, "", "", , acNormal
End If
If (Forms!FrmIssues!Combo22 = "Service Call") Then
DoCmd.OpenForm "FrmServiceCall", acNormal, "", "", , acNormal
End If
End Sub
What I need is when the accompanying form opens have the ID field on the
form populate automatically with the record ID from the main form so the new
records will be linked.
Any help is greatly appreciated!