Jan 12 2005, 07:00 PM
I have a simple question, how do you specify which record to use to fill out a report. Example, I have 500 records, I want to use record #300's info to fill in a report, how do you tell the report to use #300's info using code? any help is appreciated. Thanks in advance.
Jan 12 2005, 07:52 PM
In the docmd.OpenReport you can indicate what you want the report to filter to. In the example I have it showing me all that have the field OBS that are true. You will have to change it so that it would use your field that you want to be filtered.
DoCmd.OpenReport stDocName, acViewPreview, , "OBS = True"
DoCmd.OpenReport stDocName, acViewPreview, , "EmpID = " & me.EmpID
This one would take the value from the form text box called EmpID.
Jan 13 2005, 07:28 AM
Thanks a lot
, that is the key I have been searching for, once again you guys rule. Have a great one