really stuck

deepbreath

Registered User.
Local time
Today, 20:05
Joined
Apr 18, 2001
Messages
73
i am trying to print a report from a form by pressing the button so that only report of the current record is printed. i am using this on click event
DoCmd.OpenReport "MyReport", acViewNormal,,"[fname]=" & Me![fname]

but when i press the button it asks to enter parameter value which i have no idea.
the interesting thing i am using the same code on another database in which it works perfectly fine. i have tried, checked manytimes. but really stuck. plz help
 
The paremeter value will come up if the field asked for in the Docmd is not present on the report. Or there may be a field on the report that is not in the date source (table, query).
 
Another thing that catches me every time with a parameter message in a report is when I can't find the missing field, check the grouping levels on the report. Sometimes I find that the field has been left in the grouping when it has been removed from the report or query because it's not needed any more.
 
here here! that grouping part can really mess you up. It's ridiculous that grouping for a field isn't automatically removed if the field is deleted off the form.
 

Users who are viewing this thread

Back
Top Bottom