View Full Version : really stuck


deepbreath
07-12-2001, 06:38 AM
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

Talismanic
07-12-2001, 08:51 AM
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).

D B Lawson
07-12-2001, 01:13 PM
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.

dhoffman
07-12-2001, 01:56 PM
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.