Results 1 to 2 of 2
2002-04-19, 21:00 #1
- Join Date
- Jan 2001
- Ephrata, Washington, USA
- Thanked 0 Times in 0 Posts
Open /Search for next record (97 sr2)
I created a form, based on a parameter query, that asks for the data entry person to enter the customer's name so it will pull up that person's record. Works great. However, if you want to enter another person's name and go to that person's record, how do I do that?
I thought about creating a macro and then creating a button to run that macro, but that didn't work. I know NOTHING about VB code, so I'm trying to do all this without using code... unless someone can provide the code to me and tell me where to put it so it will run.
2002-04-19, 22:11 #2
- Join Date
- Dec 2001
- Melbourne, Australia
- Thanked 32 Times in 32 Posts
Re: Open /Search for next record (97 sr2)
Why don't you use a combo box to do the same thing, then you don't need the parameter in the query.
The code to put behind the query is either an ApplyFilter or some code these kind lounge people supplied.
Here is an example of such code:
'Find the record that matches the combo box
Dim vFindCourseDim vCriteria As String
'build criteria from combo box
vCriteria = "CourseNumber = '" & "'" & Me![FindCourse] & "'"
'find and bookmark matching record
Me.Bookmark = Me.RecordsetClone.Bookmark
'reset combo box
Me!FindCourse = ""