Making a Search Form

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I'm having a little trouble with a project. Basically I have a table with
information about certain peices of equipment I have to know about such as
Model, Range, Location, etc... I made a search page that can search by any
combination of criterias and it displays the results. That part I have
figured out. The part I can't figure out is that I get all this data listed
in a table/form and I want to be able to click on off the record and it takes
me to another form that shows the history of this device. For example if i
search for something by location and model. Say I get back 30 records. I
would like to double click on it's Property number and up pops this other
form. I have everything designed I just have to get that number I click on
to be the criteria of the query I use for the form. Any ideas on how to do
this?
 
To bring up one form, just place a button on the continues form, and the
code is:


docmd.OpenForm "yourniceform",,,"id = " & me!id

So, it only takes one line of code to do the above. To see what the button
looks like, take a read of

http://www.members.shaw.ca/AlbertKallal/Search/index.html

The above has some nice screen shots..and the above line of code is what I
used behind those buttons.

And, there is also some more screen shots of search screens here, and in the
below, if you double click on a detail line, then aging the double click
even has the SAME CODE AS above.

http://www.members.shaw.ca/AlbertKallal/Articles/Grid.htm

So, take a read/view of the above screen shots to get some ideas..and use
the above sample code to open a form to show details for the one record...
 
You can set the Filter for the pop up form to the field you double click on
(reference the full form name as well as the field name) or you can set the
Wherecondition parameter of the DoCmd.Openform method (that opens the pop up
form) to the same field in your DoubleClick event.
 
Back
Top