Activating a Custom Report for one record based on currently

ToddK

Board Regular
Joined
Dec 20, 2002
Messages
67
I would like to be able to create a functionality in my database that I am uncertain about...

I have created a Custom Report based on a query. At present time, the report prints all records of one table, and also gives details about a linked table (1 to many relationship).

I would like to be able to print the same report directly from a form where the record in the 1 table is being viewed. I would imagine I would place a button on the form.

Is there a way for me to send to the Query the "identity" of the currently viewed record and automate the process of printing the custom report for just the one viewed record?

Thanks
ToddK
 

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"
On 2003-01-15 12:17, ToddK wrote:
I would like to be able to create a functionality in my database that I am uncertain about...

I have created a Custom Report based on a query. At present time, the report prints all records of one table, and also gives details about a linked table (1 to many relationship).

I would like to be able to print the same report directly from a form where the record in the 1 table is being viewed. I would imagine I would place a button on the form.

Is there a way for me to send to the Query the "identity" of the currently viewed record and automate the process of printing the custom report for just the one viewed record?

Thanks
ToddK

G'day Todd. Just put a reference to the field in the criteria for the query. When in the form it will look at this when you run the report and obtain the report based on the field.

For example, I have a books database where I click a button and it takes me to another form based upon that record.

Query
Field = AuthorID
Criteria = [forms]![frmAuthor]![AuthorID]

If you also want to be able to print all records (not just that form) I would copy the query, rename it and put the criteria in the new one. That way you keep the functionality for both options.
 
Upvote 0

Forum statistics

Threads
1,221,510
Messages
6,160,230
Members
451,632
Latest member
purpleflower26

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top