data output in query

  • Thread starter klp via AccessMonster.com
  • Start date
K

klp via AccessMonster.com

Not sure if this is were I need to post my question or not.

I have an Sales Inquiry Screen that has a combo box on it to select the
customers contact. After all inquiries have been entered in they will print a
shippable report. If on the Inquiry screen the user does not select the
contact I want it to print all contacts. Currently in my query I have several
tables. The main table is tblSalesInquiry and I have tblSIProspContacts.
Depending on how I link the 2 tables, it will give me an outcome. So if I
link the 2 by their ContactID I get what is selected on the inquiry screen.
If I link them by their CustID I get all their contacts regardless of what
they select on the inquiry screen. Hopefully this makes sense and is not
confusing. So I guess, where do I need to depict my criteria? I have been
doing it in my query but I can't seem to get it. Any help is very much
appreiciated.

Kim P
 
G

Guest

sub PrintAll()
if me.combobox.value = "" then
docmd.openReport "ReportAll"
else
if me.combobox.value = "customer" then
docmd.openReport "Report" **report with name field as criteria in query;
end if
end if
end sub
 

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