473,325 Members | 2,785 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,325 software developers and data experts.

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 1836
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

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

Similar topics

1
by: Colin Colin | last post by:
I downloaded a calendar.asp file that someone named Jacob "WickedPisser" Gilley made. It's a few years old but It works fine and it's what I was looking for without getting into ActiveX objects. ...
1
by: Jim | last post by:
I have a 2 checkboxes and a hidden field..what I want to happen is that you can only click on 1 of these checkboxes at a time and when you check a checkbox it will assign the hidden field...
2
by: J Krugman | last post by:
I have a form with a couple of submit buttons, plus a "pseudolink" that is also supposed to submit the form; the submitted form data feeds to a CGI script. The two submit buttons have the name...
18
by: Dixie | last post by:
Can I set the Format property in a date/time field in code? Can I set the Input Mask in a date/time field in code? Can I set the Format of a Yes/No field to Checkbox in code? I am working on...
3
by: Steve Yerkes | last post by:
There seems to be way too much confusion over how to set focus on the a field using a field validator. I looked all over the web and found people trying to do this, but not getting anywhere. There...
1
by: simon | last post by:
I have an unbound RTF2 control in an Access 2003 form which I set to show either unformatted text or else text with words and sentences highlighted. I do this by setting the PlainText property,...
1
by: cweibel | last post by:
This should be an easy problem for those with far more knowledge than myself with databinding. I have a VB.NET 2005 windows form with several checkboxes, textboxes and datepickers which are...
1
by: Pedro Pinto | last post by:
I'm new at access and i'm dealling with a simple problem on positioning the form record seeking a date primary field. I have simple table with two data fields: 1- date field as short-date...
1
by: LostBoy | last post by:
Hello, I have been giving a big task to add some additional features to the Access DB at work. I am not the one who originally created the DB, which makes it harder. I am familiar with access but...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.