B
Bob M
I am using Microsoft Access 2002 SP3. I have one main table named Issues
and several supporting tables all related on the ID field. The Issues table
ID field has an Autonumber to populate the field when a new record is
created. What I would like to accomplish is to have the supporting table’s
auto fill the ID field using the last ID created in the Issues table.
On my Issues form I have a combo box that depending on the selection
will open the corresponding form to the particular table. When the form
opens I want the Issues form to close and the ID field to auto fill with the
last record ID in the Issues table. The supporting tables can have many
records with the same ID.
Any and all assistance is greatly appreciated,
Bob
Below is what I currently have:
Private Sub Combo32_Change()
DoCmd.RunCommand acCmdSaveRecord
If (Forms!FrmIssues!Combo32 = "Ordering") Then
DoCmd.OpenForm "FrmOrder", acNormal, "", "", , acNormal
End If
If (Forms!FrmIssues!Combo32 = "Service Call") Then
DoCmd.OpenForm "FrmServiceCall", acNormal, "", "", , acNormal
End If
If (Forms!FrmIssues!Combo32 = "Consumables") Then
DoCmd.OpenForm "FrmConsumables", acNormal, "", "", , acNormal
End If
End Sub
and several supporting tables all related on the ID field. The Issues table
ID field has an Autonumber to populate the field when a new record is
created. What I would like to accomplish is to have the supporting table’s
auto fill the ID field using the last ID created in the Issues table.
On my Issues form I have a combo box that depending on the selection
will open the corresponding form to the particular table. When the form
opens I want the Issues form to close and the ID field to auto fill with the
last record ID in the Issues table. The supporting tables can have many
records with the same ID.
Any and all assistance is greatly appreciated,
Bob
Below is what I currently have:
Private Sub Combo32_Change()
DoCmd.RunCommand acCmdSaveRecord
If (Forms!FrmIssues!Combo32 = "Ordering") Then
DoCmd.OpenForm "FrmOrder", acNormal, "", "", , acNormal
End If
If (Forms!FrmIssues!Combo32 = "Service Call") Then
DoCmd.OpenForm "FrmServiceCall", acNormal, "", "", , acNormal
End If
If (Forms!FrmIssues!Combo32 = "Consumables") Then
DoCmd.OpenForm "FrmConsumables", acNormal, "", "", , acNormal
End If
End Sub