469,951 Members | 2,332 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,951 developers. It's quick & easy.

setting a date field in a form when clicking a yes/no box

I have tried to set a date field when I put a checkmark in a yes/no field. In the date fields control source I put the following: IIf([SetDate]=0," ",Date())
Unfortunately using Date() simply changes the date each time the day changes. I want to store a date telling my when I put the checkmark in the yes/no field and I don't want that date to change. Using Date() changes it each day. How do I set the date field to todays date when I click on the yes/no field? I don't want that date to change just because the actual date changes.

Thank You!
Sep 26 '06 #1
3 1642
PEB
1,418 Expert 1GB
Hi,

U need to do some VB!

In the properties of you checkbox find the AfterUpdate Event procedure

appears a white window in which you have to type

If me![Checkbox]=True then
Me![Mydate]=Now()
End if

So you need to change the names of
me![Checkbox]
Me![Mydate]

with yours

Close this window and run your form!

Best regards!
:)
Sep 27 '06 #2
PEB,

I can't thank you enough, it worked like a charm! I am discovering that in order to customize Access you need to know VB, which I need to learn. I do understand the over all concept of programing but I do not understand the ME! that preceeded the field names.

Thank you very much!

Robert
Sep 27 '06 #3
PEB
1,418 Expert 1GB
Hi Robert,

Me remplaces Forms![YourFromName]
This indicates that the respective object - control is in the current form

In other words in my form ;)

:)

Best regards!

:)
Sep 30 '06 #4

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

1 post views Thread by Jim | last post: by
2 posts views Thread by J Krugman | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.