P
Pass-the-reality
The below code is tied to a command button. When I push the button, a new
form opens (frmMainForm) and sets to give me a blank record. I want to
expand this code to allow the frmMainForm to open, give me a blank record and
also open a query on top of that. The query is qrySANLookUp.
Private Sub Command41_Click()
On Error GoTo Err_Command41_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frmMainForm"
DoCmd.OpenForm stDocName, , , stLinkCriteria
DoCmd.GoToRecord , , acNewRec
Exit_Command41_Click:
Exit Sub
Err_Command41_Click:
MsgBox Err.Description
Resume Exit_Command41_Click
End Sub
form opens (frmMainForm) and sets to give me a blank record. I want to
expand this code to allow the frmMainForm to open, give me a blank record and
also open a query on top of that. The query is qrySANLookUp.
Private Sub Command41_Click()
On Error GoTo Err_Command41_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frmMainForm"
DoCmd.OpenForm stDocName, , , stLinkCriteria
DoCmd.GoToRecord , , acNewRec
Exit_Command41_Click:
Exit Sub
Err_Command41_Click:
MsgBox Err.Description
Resume Exit_Command41_Click
End Sub