Hi, here is the situation:
ive been trying to get this to work but no luck...
Text Box: Email
Check Box 1: newsletter
Check Box 2: promotions
Check Box 3: HolidayCard
Check Box 4: BadEmail
Heres what i need:
if any of the checkboxes (1, 2 or 3) is checked, and there is no text in the text box, then checkbox 4 will get checked...
however, i would still like a manual option with checkbox 4
thanks in advance for all your help...
shy
Hello shy,
Where are these controls located: worksheet or VBA UserForm? If they are on a worksheet are the controls Form type or Control ToolBox type?
Sincerely,
Leith Ross
Remember To Do the Following....
1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.2. Thank those who have helped you by clicking the Starbelow the post.
3. Please mark your post [SOLVED] if it has been answered satisfactorily.
Old Scottish Proverb...
Luathaid gu deanamh maille! (Rushing causes delays!)
its a vba userform
thanks
Hello shy,
Here is the code for the UserForm. The Sub "CheckStatus" needs to be placed in the General Declarations section (Very Top) of the UserForm. Each check box except the last calls this code. This allows you to manually change Checkbox4.
Code:Sub CheckStatus() If (CheckBox1 Or CheckBox2 Or CheckBox3) And TextBox1 = "" Then CheckBox4.Value = True End If End Sub Private Sub CheckBox1_Click() CheckStatus End Sub Private Sub CheckBox2_Click() CheckStatus End Sub Private Sub CheckBox3_Click() CheckStatus End Sub
Sincerely,
Leith Ross
Remember To Do the Following....
1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.2. Thank those who have helped you by clicking the Starbelow the post.
3. Please mark your post [SOLVED] if it has been answered satisfactorily.
Old Scottish Proverb...
Luathaid gu deanamh maille! (Rushing causes delays!)
ok, that worked fine in excel (thanx), but we decided to switch to access, and now im totally lost. how can i implement this into an access for...where do i put the macro??
thanks alot
ps: i guess this should be moved to access programming
Hello shy,
I don't know Access. You will need to repost in the Access Forum. Include a link back to this post so others will know what has been done so far.
Sincerely,
Leith Ross
Remember To Do the Following....
1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.2. Thank those who have helped you by clicking the Starbelow the post.
3. Please mark your post [SOLVED] if it has been answered satisfactorily.
Old Scottish Proverb...
Luathaid gu deanamh maille! (Rushing causes delays!)
ok great...thanks
Hello shy,
Actually, I can move this thread to the Access Programming forum for you.
Sincerely,
Leith Ross
Remember To Do the Following....
1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.2. Thank those who have helped you by clicking the Starbelow the post.
3. Please mark your post [SOLVED] if it has been answered satisfactorily.
Old Scottish Proverb...
Luathaid gu deanamh maille! (Rushing causes delays!)
All you should need to do is enter me. in from of all objects. This should be placed in the module of your form in VBA. I would also use the AfterUpdate event.
Code:Sub CheckStatus() If (me.CheckBox1.Value = True Or me.CheckBox2.Value = True Or me.CheckBox3.Value = True) _ And me.TextBox1.Value = "" Then me.CheckBox4.Value = True End If End Sub Private Sub CheckBox1_AfterUpdate() CheckStatus End Sub Private Sub CheckBox2_AfterUpdate() CheckStatus End Sub Private Sub CheckBox3_AfterUpdate() CheckStatus End Sub
Last edited by dmaesj; 04-21-2010 at 12:17 AM.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks