A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Database Design
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Automatically Check Checkbox



 
 
Thread Tools Display Modes
  #1  
Old October 18th, 2004, 05:55 PM
CMD
external usenet poster
 
Posts: n/a
Default 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  
Old October 18th, 2004, 08:32 PM
Randy
external usenet poster
 
Posts: n/a
Default

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  
Old October 22nd, 2004, 12:05 AM
CMD
external usenet poster
 
Posts: n/a
Default

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  
Old October 22nd, 2004, 01:06 AM
Randy
external usenet poster
 
Posts: n/a
Default

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  
Old November 8th, 2004, 09:24 PM
CMD
external usenet poster
 
Posts: n/a
Default

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  
Old November 9th, 2004, 11:42 AM
Randy
external usenet poster
 
Posts: n/a
Default

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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

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


All times are GMT +1. The time now is 08:38 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.