Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Only show one address in report

Status
Not open for further replies.

snuffi01

Technical User
May 24, 2003
26
SE
I have an form with workorders.
In the form i have an command button named "order by fax" when this button is pressed an form named "Print order fax" is opened, this form has no recordsource. This form collects some data from my workorder form and it has 2 checkboxes and one "OK" button. The checkboxes is named "Destination Customer" and "destination my company". When i for example check the "destination Customer" checkbox and press the OK button it open an report called "Order by fax" this form collects materials from my workorder form and collects the Customer address and also my own companys address. If i have checked the "Destination Customer" in my "Print order fax" i want my "Order by fax" form to contain the customers address only and not my one companys addres.
Please excuse my bad english,i hope you understand me!
 
Hi

I hope I understand what you mean, presumably you have teh code to populate the addresses, so you just need an IF, something like

If Chk1 Then
... code to Populate two addresses
End If

If Chk2 Then
... code to populate one address
End If

Where ch1 and ch2 are the names of your check boxes,

BUT

this would be better achieved with an option group containing two option buttons, since the options are mutually exclusive (ie only one option can be selected, sensibly)

In this case it would be an If Else, something like

If optGroup = 1 Then
... etc for one address
Else
...etc for two addreses
End If

Regards

Ken Reay
Freelance Solutions Developer
Boldon Information Systems Ltd
Website needs upgrading, but for now - UK
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top