Popup box before report opens...

  • Thread starter Thread starter stephendeloach via AccessMonster.com
  • Start date Start date
S

stephendeloach via AccessMonster.com

I have a report that has Bill To: in it. When we open the report if the Bill
To: has changed i have to go into design view and change it manually. Is
there a way I can have a popup box before the report is opened and I can
enter the Bill To: address there? Thanks
 
yes, you can easily prompt the user for a value when the report opens.

In the Report_Open event:

Dim strResponse as string
strResponse = InputBox "Enter Bill-To # "

You would then need to add code to "change" the value on the report like you
are now. Without knowing how/what you are changing, its hard to provide
specifics.

HTH,
 
I am changing an address..
WHS
PO Drawer 1111
Shrevport, LA 71111

and

Pinnacle Operating Company
PO Drawer 111112
Shreveport, LA 11112

Does this help? Thanks
 
Well, if that address isn't stored somewhere in the db (..and why isn't it?
if it is stored, then just add the address to the query your report is based
on, or better, make the address section a subreport) and you are manually
changing an invoice address then I might very reluctantly use 3 separate
input box prompts and after each one change the appropriate text box on the
report:

strResponse = InputBox "Please enter Company Name:"
me.txtCompanyName = strResponse

strResponse = InputBox "Please enter Address1:"
me.txtAddress1 = strResponse

strResponse = InputBox "Please enter Address2:"
me.txtAddress1 = strResponse

This is an incredibly inelegant solution, but I guess it's a step up from
opening the report in design view.

HTH,
 
Back
Top