More problems with reports and forms - And macros

mtairhead

Registered User.
Local time
Today, 03:51
Joined
Oct 17, 2003
Messages
138
I posted this awhile ago, and just recently tried to fix it using the advice someone gave me…And it still doesn’t work. Perhaps I’m doing something wrong?

I have a form (Let's say it's called "Data Entry Form"). I also have a report formatted for that form. (Let's say it's called "Data Entry Report")

The user begins browsing the "Data Entry Form." When the user finds the record he/she likes, they wish to print it. I have a macro set up for this purpose...But I don't know how to get any farther. The macro does not work...

…….

The best case scenario is to be able to use the "Where Condition" on the "Open Report" command. (Both of these terms are from the "Design View" of creating a macro...) At the time (A few weeks ago) I was told my macro was wrong. I’ve corrected it, and it now looks like the following…And the entire procedure still does not work.

1. OpenReport
Report Name: Data Entry Form
View: Print
Filter Name:
Where Condition: Reports![Data Entry Report]![Call Number] = Forms![Data Entry Form]![Call Number]

When I run this, it asks me to define "Forms![Data Entry Form]![Call Number]"
And then to define Reports![Data Entry Report]![Call Number]

I don’t get it. Didn’t I just tell it that? What’s wrong with my code? Do I have to venture into the scary world of complicated things that I don’t understand…AKA – Real World…
 
Hi

I have attached a small database which should get you started.

Open the form members and go to the record you wish to print

1. Click on the 'id' field and the report will open with that record.

2. Click on the 'Title' field, the reoprt will also open with that record.

1 uses the DoCmd to open the report

2 uses a macro to do the same thing


If you open the form in design view and look at the On click propery of the two fields you will see the 2 different methods.


HTH

Norman
 

Attachments

Users who are viewing this thread

Back
Top Bottom