I have a form that contains airport information. It opens with a query where the user selects the airport to view. Once the form opens, the user can navigate through the instrument procedures at the selected airport (on the main form). I have a sub form (on a tab control) linked to the airport info on the main form to show ptas information for each instrument procedure. I would like to have a form open (PTASEnter form)when a cmd button is pressed to enter new ptas information for the instrument procedure that is displayed on the main form.
The ptas table and the instrument procedure table are linked with the field PROCEDURE ID
I am using the following code to open a form for the user to enter data.
Private Sub EnterNewPTAS_Click()
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "PTASEnter"
stLinkCriteria = "[PROCEDURE ID]=" & Me![PROCEDURE ID]
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_EnterNewPTAS_Click:
Exit Sub
Err_EnterNewPTAS_Click:
MsgBox Err.Description
Resume Exit_EnterNewPTAS_Click
End Sub
The procedure ID on the PTASEnter form does not match the procedure ID on the main form
I want the form to open with a new record so the user can enter new ptas information.
Thanks
The ptas table and the instrument procedure table are linked with the field PROCEDURE ID
I am using the following code to open a form for the user to enter data.
Private Sub EnterNewPTAS_Click()
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "PTASEnter"
stLinkCriteria = "[PROCEDURE ID]=" & Me![PROCEDURE ID]
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_EnterNewPTAS_Click:
Exit Sub
Err_EnterNewPTAS_Click:
MsgBox Err.Description
Resume Exit_EnterNewPTAS_Click
End Sub
The procedure ID on the PTASEnter form does not match the procedure ID on the main form
I want the form to open with a new record so the user can enter new ptas information.
Thanks