Referring to current record

jojo

Registered User.
Local time
Today, 04:05
Joined
Jul 20, 2012
Messages
51
I'm sure this is a simple one. I have a button on a form that calls a macro. The macro only has to print a roport of some fields on this current record. The report of the macro works. In the macro, the OpenReport where condition is =Id = [currentrecord]. Id is the autonumber, primary key. When the button is clicked a box appears asking for currentrecord as if a parameter query. Is currentrecord not the correct way to refer to the current record, so that we don't have to enter the current Id number? This button, with the macro and its report are working correctly except for that box asking for currentrecord. Access 2010
thank you so much
Jojo
 
I believe your Where Condition should look something like;
Code:
[ID]=[Forms]![YourFormName]![ID]
 
Perfect! Thank you John Big Booty!
I did get close, but only after trying numerous different combos of forms, fieldnames, and ! s. I am stunned by the simplicity and logic of this answer, and amazed by how many extremely helpful answers I have gotten from this forum-some of which were answers posted 3 or 4 years ago! It is awesome that you extremely talented, smart people share your brains with us noobs. I do have it set up to give a range of id numbs in a parameter query, but she wants to sometimes just get one, without having to enter the exact one twice as in start number and end number. She was OK with that,
but this is much quicker and better.
Thank you so much.
Jojo
 

Users who are viewing this thread

Back
Top Bottom