the post originally started in the excel forum...here:
http://www.excelforum.com/excel-prog...ml#post2240662
however, now the question is about access...
Leith Ross answered: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,
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
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
Bookmarks