Selection Criteria using Allen Browne's method

G

Guest

I need to limit the contents of a report so I first created a button and then
used the code in: http://allenbrowne.com/casu-15.html.

However, when I got an error message that read
Run-time error '2455':
You entered an expression that has an invalid reference to the property Dirty.

I don't know what this means. Any help?

I am very much a novice.

A
 
A

Allen Browne

A bound form has a property named Dirty. Access sets the property to True
when you start editing the record, and sets it to False again when you save
the edits. The code therefore saves the record before you try to print it.

If your form is unbound (nothing in its RecordSource property), there is
nothing to save, so just drop those 3 lines of the procedure.
 
G

Guest

Thanks for the quick reply. I think I figured out what was wrong before at
least my report is now opening up. However, the report always shows the
same record.

I'm wondering if this is occurring because the report is based on a query.

A

A little background that may be helpful.:
1. When I run the report, without using the form, the report shows budgets
for 20 different sites.
2. The site budgets are created using a query.
3. I want to finetune the report so that it only shows the budget for one
site at a time. That's what I'm trying to use your code for.
 
G

Guest

Thanks for the help. I figured out what the problem was based on some of
your previous responses to people on the subject.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top