Good day all,
Using Access 2007 but DB is created in Access 200o format so I can still use User Level security.
I have what am sure is a very newbie question. I want to add a control to a form which allows the user to type in a value, in this case a site #, and have the form navigate to the corresponding record.
I found some sample code that does this using a Combo Box. I tried modifying this code to use an unbound Text Box but I keep getting a runtime error 13 Type Mismatch Error.
Rec_Num is a Text Field.
Form is a Single Form.
Here is the code I am using:
If you guys need more info just let me know. Thanks in advance for any help.
Regards,
Garrett
Using Access 2007 but DB is created in Access 200o format so I can still use User Level security.
I have what am sure is a very newbie question. I want to add a control to a form which allows the user to type in a value, in this case a site #, and have the form navigate to the corresponding record.
I found some sample code that does this using a Combo Box. I tried modifying this code to use an unbound Text Box but I keep getting a runtime error 13 Type Mismatch Error.
Rec_Num is a Text Field.
Form is a Single Form.
Here is the code I am using:
Code:
Private Sub txtFindSite_AfterUpdate()
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "[Rec_Num] = " & Str(Nz(Me![txtFindSite], 0))
If Not rs.EOF Then Me.Bookmark = rs.Bookmark
End Sub
Regards,
Garrett
Comment