sorry to be a pain, but I dont know much about coding etc.
do I need to create a query first or anything? or is it just a standard report?
and where do I type that code you mentioned?
In this case no.
You can use a wizard to create a command button to open the report. Then take a look at the buttons "on click" event in visual basic (event procedure) then "..." beside. Note how the code has been built for you and modify it to similar as above. Gord
ghubbell@total.net
Was glad to find this post. However, I can't seem to get the code to work. I have the command button-no problem. I can't get it to return just the one record. Does the form have to be set to data entry or anything? Further instruction would be helpful. Thanks
Hi mp,
No difference regarding how the form is set, just as long as there is data in/on the form. Take care to watch all those commas and double-check the names of the field you are trying to address. If you have trouble with this method, instead use the query that is the Record Source of the report, and using the 'builder', add the criteria under the appropriate field in the query. You'll get the same result and then all you would need is:
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.