S
straits58
First the disclaimer: I am a newbie to Access Monster, Access, and
Programming who is trying to teach himself enough to be dangerous. I've tried
for a week to search Access Monster before resorting to a Post that is
certainly a complete "Duh!" for anyone with a modicum of Access and/or
Programming knowledge.
OK, now with that off my chest...
I'm working with a shared database of which I am not the 'owner', however I
update certain record's and generate reports that depend on the updates. I've
got a Query that pulls from two tables (I'll call them A & B). I've created a
Form using that Query as its Record Source. On the Form I have three
checkboxes from Table A (I'll call them 1,2,3), and one checkbox from Table B
(I'll call it 4). I am trying to update checkbox 4 based on the 'state' of
checkboxes 1,2,3.
Here are the conditions I'm trying to enforce for checkbox 4:
If 1 or 2 or 3 is checked, then 4 is checked
If 1 and 2 and 3 are unchecked, then 4 is unchecked
My feeble attempt at figuring out the code is:
If Me.1 = True Or Me.2 = True Or Me.3 = True Then
Me.4 = True
Else
Me.4 = False
End If
First of all, is the code close to workable? Then, whatever the code needs to
be, I don't have a clue as to where to 'insert' it into my form. I assume it
has to be at what I would call the 'global' level of the form rather than
attached to a specific control on the form, but I basically don't have a clue.
Any help would be appreciated beyond words.
Steve
Programming who is trying to teach himself enough to be dangerous. I've tried
for a week to search Access Monster before resorting to a Post that is
certainly a complete "Duh!" for anyone with a modicum of Access and/or
Programming knowledge.
OK, now with that off my chest...
I'm working with a shared database of which I am not the 'owner', however I
update certain record's and generate reports that depend on the updates. I've
got a Query that pulls from two tables (I'll call them A & B). I've created a
Form using that Query as its Record Source. On the Form I have three
checkboxes from Table A (I'll call them 1,2,3), and one checkbox from Table B
(I'll call it 4). I am trying to update checkbox 4 based on the 'state' of
checkboxes 1,2,3.
Here are the conditions I'm trying to enforce for checkbox 4:
If 1 or 2 or 3 is checked, then 4 is checked
If 1 and 2 and 3 are unchecked, then 4 is unchecked
My feeble attempt at figuring out the code is:
If Me.1 = True Or Me.2 = True Or Me.3 = True Then
Me.4 = True
Else
Me.4 = False
End If
First of all, is the code close to workable? Then, whatever the code needs to
be, I don't have a clue as to where to 'insert' it into my form. I assume it
has to be at what I would call the 'global' level of the form rather than
attached to a specific control on the form, but I basically don't have a clue.
Any help would be appreciated beyond words.
Steve