forms

Alice

New Member
Joined
Nov 27, 2002
Messages
39
Hi there, I'd appreciate some advice on a problem i'm having......
I've got a custom form, and a button added as an event procedure to add a new record to the database. One of the items on the form is a tick box, which is not cleared when I press for a new record. How do I get it to clear the tick box when I request a new record? It's driving me mad!
Many thanks, Alice
 

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.
Hi!

Right-click on the 'new record' button and select 'build event'. You should see something like:<pre>DoCmd.GoToRecord , , acNext</pre>
after this line add<pre>Checkbox1 = False</pre>
substituting Checkbox1 with the name of your checkbox.

That should do it!

edit:
oh yeah, I meant to suggest changing the default value of the Checkbox to 'False', my bad!

HTH,
_________________<EMBED width="118" height="52" src="http://corticus.biz.ly/CorticusLink.swf"></EMBED>
This message was edited by corticus on 2002-12-09 14:32
 
Upvote 0
Hi. It's not normal behavior for Access to default to checking a checkbox. There are two simple reasons for this to happen: there's a "default value" set in the table (which is probably why this is happening) or a default value set in the control properties.

The previous reply will work (although you might want to change the line to "Me![Checkbox1] = False" in case the name of your control is "Check Box 1"), but it might be easier to just set the Default Value property of the control to 0 (which is the numeric equivalent of "False" to Access -- and True = -1). That way you don't have to mess with the code.

HTH,

Brent
 
Upvote 0
Thanks for those guys, but neither of them seem to work - the defaults are set to false, and i've tried the code you suggested, and it won't work for me - my understanding is v v limited. Is there any way i can send the form to you?
v v frustrated alice-
+
 
Upvote 0
Just a thought. Try taking out the defaults for the check box in both the table and the form property
 
Upvote 0
Thanks for that guys, seems to be working now.....not really sure what I've done, but it's fixed! Many thanks, Alice
 
Upvote 0

Forum statistics

Threads
1,221,490
Messages
6,160,133
Members
451,622
Latest member
xmrwnx89

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top