Setting a report to use only database records from an ad-hoc filtered view
Hi - can any one help me - I'm stumped with what seems a simple thing to do with Access 365.
I have a database of newspaper articles - I use 'Filter by Form' to view only the database records I want to see.
I have a report setup to view/print but it always uses all of the records in the database not just the currently filtered ones.
I use the 'Filter by Form' on an ad-hoc basis to select the records I want but I can't work out how to get the report to use the current filtered view of the database.
I've looked at the property/database setting in the reports design which has a filter option but can't see how a lookup command might work for this.
kantblue
Hi,
It sounds like you typed the code in the property line. But it belongs in the VBA editor:
- In the property window go to the "On click" property of the button. Click into the property line. Then a small button with 3 dots (elipsis) appears at the right edge of the line. Click on this small button and select the code editor from the dialog that pops up.
- Paste the 3 lines of code exactly where the cursor is in the VBA code editor. Save the code (e.g. with Ctrl+S) and close the code editor.
The property line should now only say "Event Procedure". Then the button will execute this procedure and you are now a VBA programmer. 😉
Servus
Karl
****************
Access Bug Trackers
Access News
Access DevCon- In the property window go to the "On click" property of the button. Click into the property line. Then a small button with 3 dots (elipsis) appears at the right edge of the line. Click on this small button and select the code editor from the dialog that pops up.