looping through toggle buttons to EMail reports

monplankton

Registered User.
Local time
Today, 00:24
Joined
Sep 14, 2011
Messages
83
Hi, needing some help with a idea I have for my database but not sure how to . I have VBA to send multiple reports to a group of people depending on a toggle button selection. what I'm wanting to do is have it loop through the e mail process until all 5 toggle buttons have been selected and the reports have been E Mailed. Is this possible. Toggle buttons are named toggle1, toggle2 and so on. :banghead:
 
Use a For Next Loop:

Code:
  For x = 1 To 5
    ..
    Me("toggle" & CStr(x)).SetFocus
    ..  
Next x
 
Never come across this before could you expand on it as I'm struggling to understand what you refere to as X.

Thanks
 
why (ab)use the toggle button anyways?

Why not "fix" the sql independ of the toggle button?
 
Never come across this before could you expand on it as I'm struggling to understand what you refere to as X.

Thanks
In post #1 you wrote:
... what I'm wanting to do is have it loop through the e mail process until all 5 toggle buttons have been selected ... Toggle buttons are named toggle1, toggle2 and so on.
The code I gave you, select the toggle buttons one after one, depending of x.
When x=1 then "toggle1" is selected, when x=2 then "toggle2" is selected and so on, until all 5 toggle buttons has been selected.
 

Users who are viewing this thread

Back
Top Bottom