Report Header Behaving Badly

A real begineer

Registered User.
Local time
Today, 11:46
Joined
Nov 4, 2000
Messages
74
I have a report which is producing recommendations based on input from the user into a form.

From the form, the report analyses in VBA and then produces a list of actions. This is all working fairly well. (in debug, testing now)

However, there is a mysterious anomoly which I do not understand.

In the header we have some fields which as their control source have =BusinessName, = BusinessAddress, et al.

Most of the time this works fine, however, some occurences, it fails to show and shows #error instead. What is even more confusing is this is not consistant. Even repeating the same results will not replicate the error.

Any ideas where I should look?
 
Assumedly BusinessAddress is a public constant or variable. If it's a variable it may be that you have'nt yet initialised the variable before the report is opened. I'd try setting it behind the button which opens the report and see if that does it.

Ian
 
The report is actually based on an sql statement. The fields are directly inputted for this part of the report in the business details sections.

The rest of the form is populated from open forms.
 
Are the fields you enter the business details in bound to any table? If so, are you sure the information is being saved to the table before issuing the openreport command?

Does anybody else have any ideas???
 
Yes the fields BusinessName, BusinessAddress etc are bound to a table.

I have a work around for now, which is reliable, using code to populate instead. However, the other method is supposed to be more reliable?
 

Users who are viewing this thread

Back
Top Bottom