G
Guest
Code (1) Created by wizard to refresh the “Location†combobox
Private Sub Location_AfterUpdate()
On Error GoTo Err_Refresh__Click
DoCmd.DoMenuItem acFormBar, acRecordsMenu, 5, , acMenuVer70
Exit_Refresh__Click:
Exit Sub
Err_Refresh__Click:
MsgBox Err.Description
Resume Exit_Refresh__Click
End If
End Sub
Code (2)
Private Sub Location_AfterUpdate()
If Not IsNull(Me![Location]) Then
Me![CargoTallyID] = [Forms]![CargoTallyfrm].[CargoTallyID]
ElseIf IsNull(Me![Location]) Then
Me![CargoTallyID] = Null
End If
End Sub
Both these codes work great when used individually, however because the
“Location†afterupdate event will trigger both I need to to combine them into
one please help.
Private Sub Location_AfterUpdate()
On Error GoTo Err_Refresh__Click
DoCmd.DoMenuItem acFormBar, acRecordsMenu, 5, , acMenuVer70
Exit_Refresh__Click:
Exit Sub
Err_Refresh__Click:
MsgBox Err.Description
Resume Exit_Refresh__Click
End If
End Sub
Code (2)
Private Sub Location_AfterUpdate()
If Not IsNull(Me![Location]) Then
Me![CargoTallyID] = [Forms]![CargoTallyfrm].[CargoTallyID]
ElseIf IsNull(Me![Location]) Then
Me![CargoTallyID] = Null
End If
End Sub
Both these codes work great when used individually, however because the
“Location†afterupdate event will trigger both I need to to combine them into
one please help.