Opening a Report off of Search Results Report (1 Viewer)

sevanty7

New member
Local time
Today, 04:03
Joined
May 17, 2013
Messages
3
I currently have a search results Report that displays information from individual records. When someone searches by typing in a description of a record for example the report would show:

Records with related descriptions in a textbox - "Description"
also fields that go along with that related record such as
plan number, file location, physical description

Due to a large amount of records within the database and to make it easier then scrolling through large amounts of records once clients type their search criteria in, I want to have a button beside the record that opens another report that has more fields associated with the record
:banghead: :banghead: :banghead: :banghead:
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 03:03
Joined
Feb 19, 2002
Messages
43,266
Do you really mean report rather than form? Reports are "dead" in versions of Access prior to A2007 but from A007 on, click events are recognized.

Just use DoCmd.OpenReport ... or DoCmd.OpenForm .... and use the Where argument to provide the ID of the record you want to open.
 

sevanty7

New member
Local time
Today, 04:03
Joined
May 17, 2013
Messages
3
What exactly is the where argument?
I have generally no knowledge of using VBA code I'm generally doing everything using macros
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 03:03
Joined
Feb 19, 2002
Messages
43,266
If you need help with macros, the macro forum would be more appropriate. The OpenReport/OpenForm Method (VBA) or Action(macro) have a "where" argument. If you type DoCmd.OpenReport in a code module, Access will show you how to complete the remainder of the expression using intellisense as soon as you type the space following the OpenReport (or OpenForm). In a macro, you see all the arguments listed as soon as you select the macro action.
 

Users who are viewing this thread

Top Bottom