Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

find records then displaying them 1

Status
Not open for further replies.

Onslaughtdave

Programmer
Jan 24, 2005
59
CA
Hi,

I am trying to insert a find employee text box.

I have it running and it finds the employee but...it doesnt do anything. How do i get it to display the records once it finds it.

i have:

Dim rs As DAO.Recordset
Dim db As DAO.Database
Dim find As String
Dim name As String

Set db = CurrentDb()
Set rs = db.OpenRecordset("Accident", dbOpenDynaset)

find = "[EmpNum] = " & name
rs.FindFirst find

( some code has been removed from bottom )


now this works, but it doenst change the record. Is it because its in the header of the frame not the detail?

thanks,

dave
 
Take a look at the RecordsetClone, FindFirst, NoMatch and Bookmark properties/methods of the Form/DAO.Recordset objects.
Note: To compare text values use single quotes.
strFind = "[EmpNum]='" & name & "'"

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top