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 » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Deselect check box on form closing



 
 
Thread Tools Display Modes
  #1  
Old July 9th, 2004, 12:51 PM
Deb Smith
external usenet poster
 
Posts: n/a
Default Deselect check box on form closing

Is it possible to automatically have a selected check box revert to an
unchecked state when the form is closed. If so how would you do this?

Any suggestions would be appreciated


  #2  
Old July 9th, 2004, 02:26 PM
Ed Robichaud
external usenet poster
 
Posts: n/a
Default Deselect check box on form closing

Sure; you could use the form's "on close" event to run something like:
Me!myCheckbox = 0

-Ed

"Deb Smith" wrote in message
...
Is it possible to automatically have a selected check box revert to an
unchecked state when the form is closed. If so how would you do this?

Any suggestions would be appreciated




  #3  
Old July 9th, 2004, 02:27 PM
Larry
external usenet poster
 
Posts: n/a
Default Deselect check box on form closing

I assume the checkbox is linked to a field in a table, othewise it wouldn't
matter if it was checked or not when closed.

In the Unload even of the form, execute some code to set that field to
False. I tend to use SQL for this, but I know other's prefer to do it with
Access code directly. The main thing is putting it in the Unload event,
which is executed when the form is closed.

"Deb Smith" wrote in message
...
Is it possible to automatically have a selected check box revert to an
unchecked state when the form is closed. If so how would you do this?

Any suggestions would be appreciated




  #4  
Old July 9th, 2004, 02:57 PM
Deb Smith
external usenet poster
 
Posts: n/a
Default Deselect check box on form closing

Thanks for the suggestions. I have used the following and it works.

DoCmd.SetWarnings False
DoCmd.RunSQL "UPDATE MailList SET Selected = False;"
DoCmd.SetWarnings True

Once again thank you for taking the time to respond.
"Larry" wrote in message
...
I assume the checkbox is linked to a field in a table, othewise it

wouldn't
matter if it was checked or not when closed.

In the Unload even of the form, execute some code to set that field to
False. I tend to use SQL for this, but I know other's prefer to do it with
Access code directly. The main thing is putting it in the Unload event,
which is executed when the form is closed.

"Deb Smith" wrote in message
...
Is it possible to automatically have a selected check box revert to an
unchecked state when the form is closed. If so how would you do this?

Any suggestions would be appreciated






 




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
Passing value to modal child form in MS Access using VBA? Grahammer Using Forms 6 July 4th, 2004 11:53 PM
Copying Check Box Form Fields Smith A General Discussion 1 June 23rd, 2004 03:11 PM
Filtering form on True-False check boxes EHPorter Using Forms 1 June 10th, 2004 05:46 PM
Spell check form? Rick General Discussion 1 June 4th, 2004 02:12 PM
How do you print reports from selected check boxes in a form that is related to one record? Ray Database Design 1 May 14th, 2004 01:09 PM


All times are GMT +1. The time now is 09:20 PM.


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