How can I search for and display actual record numbers in Access?

D

DTermani

I have a form that has several fields to save data in for achieve
purposes. I also have a search form that pulls that data and displays it,
each in an individual line. It would be ideal to be able to click on a
search result and then on the main form have that record be displayed. I do
not know how to do that, so I was hoping to just be able to display the
record number in the search results so that you can just type it in the main
form and go right to that record number. I am unable to do that either, I
tried several combinations of displaying something like me.currentrecord for
each line in the results, but they all show the same thing, which is the
record number of the actual search results page.

If anyone would help in how to proceed I would really appreciate it!

Thanks,
Dan
 
J

Jeanette Cunningham

Dan,
on the double click event of one of the textboxes on the search form put
code something like this:
DoCmd.OpenForm "FormName", , , "[KeyID]= " & Me.txtKeyID & ""
DoCmd.Close acForm, Me.Name

FormName is the name of your main form
KeyID is the Primary Key field on your main form and also the PrimaryKey
field on your search form
txtKeyID is the name of the textbox that has the KeyID field

Jeanette Cunningham
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top