Guest_imported
New member
- Jan 1, 1970
- 0
Greetings
I have a rather awkard problem:
Ive copied this code perfectly out of the book and everytime I run it this error comes up
User-defined type not defined
And the region highlighted is this:
Dim rst As DAO.Recordset
why is this?
This might not make alot of sense on its own but heres the rest of the code:
Private Sub ShowRecord_Click()
' Find the selected record, then close the dialog box.
Dim rst As DAO.Recordset
' Store the recordset for the Bookings form.
Set rst = Forms!Booking.RecordsetClone
' Locate the record for the selected Customer.
rst.FindFirst "BookingID = " & List6
' Set the form's Bookmark property to move to the record.
Forms!Booking.Bookmark = rst.Bookmark
' Close the dialog box.
DoCmd.Close acForm, "GoToRecordDialog"
End Sub
Its pretty hard to explain the situation fully so heres the link to my briefcase.
It wont take long to download. I promise!
In here is the currently developing system and a readme explaining my situation. Feel free to play around with it
I'm sure you lot will solve this
Thanks
I have a rather awkard problem:
Ive copied this code perfectly out of the book and everytime I run it this error comes up
User-defined type not defined
And the region highlighted is this:
Dim rst As DAO.Recordset
why is this?
This might not make alot of sense on its own but heres the rest of the code:
Private Sub ShowRecord_Click()
' Find the selected record, then close the dialog box.
Dim rst As DAO.Recordset
' Store the recordset for the Bookings form.
Set rst = Forms!Booking.RecordsetClone
' Locate the record for the selected Customer.
rst.FindFirst "BookingID = " & List6
' Set the form's Bookmark property to move to the record.
Forms!Booking.Bookmark = rst.Bookmark
' Close the dialog box.
DoCmd.Close acForm, "GoToRecordDialog"
End Sub
Its pretty hard to explain the situation fully so heres the link to my briefcase.
It wont take long to download. I promise!
In here is the currently developing system and a readme explaining my situation. Feel free to play around with it
I'm sure you lot will solve this
Thanks