I am a newbie trying to learn Access from several books. I'm sure this is an easy one to answer..for someone, not me. Is it possible to insert a checkbox on a form which, when checked, inserts the current date into one of the fields in the form?
In Design View I put a checkbox alongside a field (Honorarium1).
I clicked to select it, then in its Properties I typed Honorarium1 as the Control Source.
When I clicked in the checkbox in form view 12/29/1899 appeared in the Honorarium field. huh??? I tried changing the Control Source to another field in the form and nothing came up when i tested it. I checked my underlying table and didn't have that odd date anywhere in in the table.
I'm also wondering if I can place checkboxes next to several other fields on the form as well. The form lists several milestones that occur at different dates and I want to avoid having to type the current date into each of them for each record. Same procedure?
Thank you. Joan
3 5917 NeoPa 32,556
Expert Mod 16PB
You have (accidentally) posted this question in the Access Articles section. This is NOT an article.
I'm moving this to the main Access questions forum.
MODERATOR.
NeoPa 32,556
Expert Mod 16PB
I am a newbie trying to learn Access from several books. I'm sure this is an easy one to answer..for someone, not me. Is it possible to insert a checkbox on a form which, when checked, inserts the current date into one of the fields in the form?
In Design View I put a checkbox alongside a field (Honorarium1).
I clicked to select it, then in its Properties I typed Honorarium1 as the Control Source.
When I clicked in the checkbox in form view 12/29/1899 appeared in the Honorarium field. huh??? I tried changing the Control Source to another field in the form and nothing came up when i tested it. I checked my underlying table and didn't have that odd date anywhere in in the table.
I'm also wondering if I can place checkboxes next to several other fields on the form as well. The form lists several milestones that occur at different dates and I want to avoid having to type the current date into each of them for each record. Same procedure?
Thank you. Joan
You can use a CheckBox if you like, but various other programmable events could also be used. A CheckBox is probably not the most appropriate in the circumstances, as unchecking it later wouldn't make much sense. What about using the Double-Click event of the control you're using to store the date field in? In the event property just have some code to say : - Me.[YourDateControl] = Date()
NeoPa's suggestion is right on the money! Replacing YourDateField in the following code - Private Sub YourDateField_DblClick(Cancel As Integer)
-
Me.YourDateField = Date()
-
End Sub
-
with the actual name of your date field will allow your users to assign the current date to the field by double-clicking on it. You can repeat this for as many fields as is necessary. 12/29/1899 is the date Access defaults to, if you will, when a non-date is assigned to a field whose datatype is defined as Date/Time.
I clicked to select it, then in its Properties I typed Honorarium1 as the Control Source.
This has assigned a date field Honorarium1 as the Control Source of a checkbox, which has a datatype of Yes/No, which is confusing Access. You need to go back into the Properties box and delete this.
Welcome to TheScripts, Joan!
Linq ;0)> Sign in to post your reply or Sign up for a free account.
Similar topics
by: jason |
last post by:
How does one loop through the contents of a form complicated by dynamic
construction of checkboxes which are assigned a 'model' and 'listingID' to
the NAME field on the fly in this syntax:...
|
by: Robin Lawrie |
last post by:
Hi again, another problem!
I've moved from an Access database to SQL server and am now having trouble
inserting dates and times into seperate fields. I'm using ASP and the code
below to get the...
|
by: cavassinif |
last post by:
I need to dynamic select a column in which insert a vale based on a
parameter value, I have this code, but it throws an incorrect syntax
error.
How do I dinamically select a column to insert...
|
by: rn5a |
last post by:
During registration, users are supposed to enter the following
details: First Name, Last Name, EMail, UserName, Password, Confirm
Password, Address, City, State, Country, Zip & Phone Number. I am...
|
by: sheenaa |
last post by:
Hello Members,
I m creating my application forms in ASP.Net 2005 C# using the backend SQL Server 2005.
What i have used on forms :: ?
On my first form i have used some...
|
by: TechnoAtif |
last post by:
INSERT AND UPDATE MULTIPLE CHECKBOX DATA USING PHPMYSQL OR JAVASCRIPT
Hi All
I want to check the multiple checkboxes update them after revisiting that page.
I am taking the name as...
|
by: gpspocket |
last post by:
help me -CURSOR backward insert from End Date > to Start Date
how to insert dates from end to start
like this
SELECT 111111,1,CONVERT(DATETIME, '17/03/2008', 103), CONVERT(DATETIME,...
|
by: ddtpmyra |
last post by:
I don’t know if I posted my question on the right forum if not my bad, but I’m having trouble how to create a php script that will insert data on mysql
Scenario:
I have 3 checkbox on my form and...
|
by: bonneylake |
last post by:
Hey Everyone,
Well recently i been inserting multiple fields for a section in my form called "serial". Well now i am trying to insert multiple fields for the not only the serial section but also...
|
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: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
|
by: ryjfgjl |
last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
| |