Use value in a field as input to a query

G

Guest

Hello,
What I want to do is have a macro that is called by a button or link in a
field on a table. this will be a generic macro that will get the value in
the "record id" field of the record the button pressed is in, and feed that
value into a query.

the end result is a user looking at search results can press a button for
the record they want to view all details on. A bit like when you use the
catalog at a library (although this is for an image-base)
 
M

[MVP] S.Clark

The Docmd.OpenForm macro action accepts a parameter called 'Where'. This is
a where clause, like in a query.

So, if you give it something like "RecordID=" & forms!formname!ctrlname it
will open your form, and filter the recordID by the value on the calling
form
 
G

Guest

Thanks.
Yesterday I Picked up a old Microsoft Press book titled Running Access for
windows 95. While it is technicly out of date the concepts are still valid.
It appears that I should be viewing the search results in a continuious form
rather than a report. The book does discusses how to do the sort of thing
that I want to do.

Havn't had a chance to re-do it yet due to clearing a few graphics projects
off my desk.
 

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