I have an Add/Edit for that has a couple of buttons for lookups that call other forms.
One button for FileNumberLookup and another for TrackingNumberLookup.
When the user clicks on the button a user prompt is presented (stored procedure) and the user enters the criteria. Then the lookup form is presented with the requested data. When the user clicks on the "close" button I need it to return to the form that the user came from.
Here is what I had been using.
But this would mean that I would have to modify the code for each close button on each form. I was hoping for a better way to do this.
Thanks
John Fuhrman
One button for FileNumberLookup and another for TrackingNumberLookup.
When the user clicks on the button a user prompt is presented (stored procedure) and the user enters the criteria. Then the lookup form is presented with the requested data. When the user clicks on the "close" button I need it to return to the form that the user came from.
Here is what I had been using.
Code:
Private Sub btnBoxNumberLookup_Click()
DoCmd.OpenForm "frmFileNumberLookup", acNormal, , , acFormEdit, acWindowNormal, Me.Name
End Sub
Code:
Private Sub CloseForm_Click()
If fIsLoaded("frmTrackingTable") = False Then
DoCmd.Close acForm, Me.Name
DoCmd.OpenForm ("frmTrackingTable")
Else
DoCmd.Close acForm, Me.Name
DoCmd.SelectObject acForm, "frmTrackingTable"
End If
End Sub
Thanks
John Fuhrman