1. Put an unbound "search" textbox in the forms header or footer. Add a
cmd_Search command button next to it.
2. In the command buttons click event, try something like:
Private Sub cmd_Search_Click
Dim strCriteria as string
dim rs as dao.recordset
strCriteria = "[ID] = " & me.txt_Search
set rs = me.recordsetclone
rs.findfirst strCriteria
if rs.nomatch then
msgbox "ID not found"
Else
me.bookmark = rs.bookmark
endif
rs.close
set rs = nothing
End sub
HTH
Dale
--
Don''t forget to rate the post if it was helpful!
email address is invalid
Please reply to newsgroup only.
Nate said:
Karl.....thanks for the info.....
That is what is need to do. I have a feild that I was referring to as
record number. I need to search for that feild and then pull that record up
in a form........but how......
Thanks
:
Records do not have a searchable record number. Any number displayed for a
record is just a sequence number of the order that they are currently
displayed.
Now if you have a field that you are entering a distinctive record
identifier you could search on that field.
--
KARL DEWEY
Build a little - Test a little
:
Can anyone give the macro overview of how to do the following task.
Have an enrty box in which I can enter a record number, search for that
record and that record be displayed in an exsisting form for editing.
Thanks a bunch