i am trying to construct the navigation of my database forms.
Am having trouble when it comes to opening one form and then closing the previous form.
here is the code i am using however the 'doCmd.close' seems to be refering to the wrong form so what happens is it opens my desired form then immedietley closes it again. Rather than opening my new form then closing the old form.
here is the code:
is ther a way to specifically refer to a desired form in order to close it using 'doCmd.close'.
Private Sub Command3_Click()
On Error GoTo Err_Command3_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frmClients"
stLinkCriteria = "[ClientID]=" & Me!
[List3]
DoCmd.OpenForm stDocName, , , stLinkCriteria
DoCmd.Close
Exit_Command3_Click:
Exit Sub
Err_Command3_Click:
MsgBox Err.Description
Resume Exit_Command3_Click
End Sub
cheers