473,809 Members | 2,772 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

4 New Member
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 1852
PEB
1,418 Recognized Expert Top Contributor
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
Pavkovich
4 New Member
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 Recognized Expert Top Contributor
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
1666
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. But I am having trouble with something that I beleive it's because of my lack of JavaScript knowledge. In the initilizing code, he has: ' Add event code for when a day is clicked on. Notice ' that when run inside your browser, "$date" is...
1
5594
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 "txtreferral" a value and when you uncheck the checkbox it will set the hidden field value back to nothing ..I have the clicking on 1 check box at a time down but when I try to add the code to assign the value to the hidden field I get an error in the...
2
2260
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 "go_for_it", so that when the form is submitted, the CGI script looks for the value of the CGI parameter "go_for_it". I want the pseudolink to set the value of this CGI parameter prior to submitting the form, but I can't get it to work. Here's the...
18
18450
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 a remote update of tables and fields and can't find enough information on these things. Also, how do you index a field in code?
3
8322
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 are a couple of people selling components... but that is not really an option for me... So, I took the plunge and modified the "WebUIValidation.js" file to make it happen... After tracing through file, I figure it out. It was actually pretty...
1
3880
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, getting back the rtfText and then adding the highlighting strings and resetting rtfText as below: sqry = "Select * from TextContent where FileID = " & ID Set rs = CurrentDb().OpenRecordset(sqry, dbOpenSnapshot) With rtfUnformatted ..rtfText = ""
1
1928
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 bound to a single dataset (running SQL Server 2000). The form also contains a record navigation bar to move through the records. When the form loads, after assigning the table adapter, I call the AddNew event which calls a function I have to set the...
1
1412
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 (primary field) 2 - description field as text Every time i try to use a me.recordsetclone.findfirst to match a date starting with a zero (i.e 02-09-2006) it gives me nomatch but the record exists! If the date doesn't start with zero (i.e 20-09-2006)...
1
2479
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 for what is being asked of me I believe requires programming. I have all the tables, forms I need but don’t know how to put the programming part together. If it does require programming please be patient with me I will try my best. I will try to...
0
9721
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9601
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10376
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10115
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9199
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7660
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6881
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5687
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3861
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.