If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Automatically Check Checkbox
I'm building a database in which I would like to have checkboxes
automatically checked on a summary form once certain other information has been entered into the underlying table. Is there any way to do this??? |
#2
|
|||
|
|||
Dear CMD,
Try the following: 'Please place this code on the AfterUpdate events of both: Field1 and Field2. IF ((NZ(Me.Field1,"") "") AND (NZ(Me.Field2,"") "")) THEN 'Check the checkbox if both Field1 and Field2 are populated Me.Check1 = True ELSE 'Uncheck the checkbox if Field1 and Field2 are empty Me.Check1 = False END IF -Randy "CMD" wrote in message ... I'm building a database in which I would like to have checkboxes automatically checked on a summary form once certain other information has been entered into the underlying table. Is there any way to do this??? |
#3
|
|||
|
|||
Hi Randy,
Thanks for your response. The code you sent appears to be exactly what I need, but it doesn't seem to be working. When I substitute the field names, this is what it looks like: If ((Nz(Me.[LRP Held], "") "") And (Nz(Me.[Date Received], "") "")) Then 'Check the checkbox if both LRP Held and Date Received are populated Me.LRP Responded = True Else 'Uncheck the checkbox if LRP Held and Date Received are empty Me.LRP Responded = False End If (LRP Held is the field I would like to trigger the code, and LRP Responded if the box I want checked if that field is populated.) Can you tell me where I might be going wrong? Thanks for your help! CMD "Randy" wrote: Dear CMD, Try the following: 'Please place this code on the AfterUpdate events of both: Field1 and Field2. IF ((NZ(Me.Field1,"") "") AND (NZ(Me.Field2,"") "")) THEN 'Check the checkbox if both Field1 and Field2 are populated Me.Check1 = True ELSE 'Uncheck the checkbox if Field1 and Field2 are empty Me.Check1 = False END IF -Randy "CMD" wrote in message ... I'm building a database in which I would like to have checkboxes automatically checked on a summary form once certain other information has been entered into the underlying table. Is there any way to do this??? |
#4
|
|||
|
|||
Replies inline,
"CMD" wrote in message ... Thanks for your response. The code you sent appears to be exactly what I need, but it doesn't seem to be working. When I substitute the field names, this is what it looks like: If ((Nz(Me.[LRP Held], "") "") And (Nz(Me.[Date Received], "") "")) Then 'Check the checkbox if both LRP Held and Date Received are populated Me.LRP Responded = True Else 'Uncheck the checkbox if LRP Held and Date Received are empty Me.LRP Responded = False End If The error is your checkbox code for "LRP Responded ". Fix it as follow: Me.[LRP Responded] = True |
#5
|
|||
|
|||
Randy,
I've been out sick and just got your reply, but you are AWESOME!!! Thank you so much. It works like a charm!!!! I'm just thrilled. Anybody else reading this, Randy is THE MAN!! :-) Have a great week! CMD "Randy" wrote: Replies inline, "CMD" wrote in message ... Thanks for your response. The code you sent appears to be exactly what I need, but it doesn't seem to be working. When I substitute the field names, this is what it looks like: If ((Nz(Me.[LRP Held], "") "") And (Nz(Me.[Date Received], "") "")) Then 'Check the checkbox if both LRP Held and Date Received are populated Me.LRP Responded = True Else 'Uncheck the checkbox if LRP Held and Date Received are empty Me.LRP Responded = False End If The error is your checkbox code for "LRP Responded ". Fix it as follow: Me.[LRP Responded] = True |
#6
|
|||
|
|||
CMD wrote:
Randy, I've been out sick and just got your reply, but you are AWESOME!!! Thank you so much. It works like a charm!!!! I'm just thrilled. Anybody else reading this, Randy is THE MAN!! :-) Have a great week! CMD Thanks for all the kind words ;-) Glad everything is working. -Randy |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Problem Updating New Messages from NTTP News Server OE | Chad Harris | Outlook Express | 19 | February 7th, 2005 07:21 PM |
Need to setup xls to compute and check Vin Digit | Dukester | General Discussion | 11 | November 5th, 2004 01:47 AM |
Automatically Update Document Styles | Shugwan | General Discussion | 1 | August 7th, 2004 03:09 AM |
Repost of Checkbox Help | ChrisBat | Using Forms | 3 | June 29th, 2004 05:09 PM |
New Check Box Issue | Kembo | Using Forms | 1 | June 24th, 2004 06:45 PM |