I have a form that consists of two buttons in an option group: Airline and Non Airline (Train or Bus). The fields consist of participant’s name and ride information.
What I would like to do is to bring up a special form (such as Airline information or Bus/Train information)and clone the recordset from the Transportation form and bookmark it in the Airline form in order to attach the airline information to that particular participant.
Here’s my code that I created and I keep on getting an error message: “Runtime Error 3077, Syntax Error (Missing Operator) in Expression” and if I remove that line, then I get “No records” error message.
Here’s my code:
Private Sub fraTypeOfTransp_Click()
‘ Clicking on those buttons will open appropriate form to enter information.
Dim rst As DAO.Recordset
Select Case fraTypeOfTransp ‘ Open form based on the value of the option.
Case 1 ‘Opens Airline form
DoCmd.OpenForm “frmAirline”
‘ Store the recordset for the Transportation form.
Set rst = Forms!FrmTransp.RecordsetClone
‘ Locate the record for the selected participant.
rst.FindFirst “ParticipantID = ”
‘ Set the form’s Bookmark property to move to the record.
Forms!FrmAirline.Bookmark = rst.Bookmark
Case 2 ‘Opens NonAirline Form
DoCmd.OpenForm “frmNonAirline”
(I’m not finished with Case 2)
End Select
End Sub