Event Procedure on a Command Button in a form

G

Guest

I'm trying to print a report via a form. I want to be able to do the following:

1. Click on the first Toggle Button which is in option group 1 (has more
then one Toggle Button in option group) then
2. Click on the Second Toggle Button whick is in the next option group 2
(has more then one Toggle Button in option group) then
3. Click on the Third Toggle Button whick is in the next option group 3
(has more then one Toggle Button in option group) then
4. Click on a command Button for specified report (I have the Event
Procedure "On Click")

How would that look if I did a IF statement?
 
G

Guest

If you are saying you have 3 options groups and each option group has
multiple opton buttons and you want to select an option from each of the 3
option groups to select a report to print. And then, click a command button
to rurn the report, put the logic in the Click event of the command button.

Since you have multiples of each, a Select Case statement or nested Select
Case statements should be the way to go, but you don't say what each of the
groups selects. If you can post back with what the meaning of each of the 3
groups is, I can show you how to make it work.
 
G

Guest

Option group 1 meaning = Print Option and Toggle Button has a option value of 1
Option group 2 meaning = Chose Option and Toggle Button has a option value
of 1
Option group 3 meaning = Search Option and Toggle Button has a option value
of 3

Report name is "rptRateOptionTicklerbyAgencySpecialistCloser"
 
G

Guest

I still don't understand, I don't think. If you select option 1, you want to
print the report, if you select option 2, Choose what from where?, and option
3, search what and how?
 
G

Guest

Depending on what toggle buttons you select will determine what report you
get. So if you select a toggle button under option 1 (print option) I'll pick
the toggle button named "Print" with an option value of 1. Then pick a
toggle button under option 2 (chose option) I'll pick the toggle button named
"closer" with a option value of 1.
Then pick a toggle button under option 3 (search option) I'll pick the
toggle button named "Agency Specialist Name" with a option value of 3. So
based on that criteria the command button that I click on will print out the
correct report. I hope this helps. Thanks.
 
G

Guest

Okay, I got it. Thanks. I would use a Select Case statement rather than a
bunch of If statements. I don't know what the other options are or what you
will do with the other selections, but the basic concept is:

Select Case Me.Option1
Case is 1
'Do whatever to prepare for printing
Case is 2
'Do whatever for option 2
Case is 3
'Do whatever for option 3
End Select
 

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