473,398 Members | 2,404 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,398 software developers and data experts.

Date Time Data Entry

I have a database with 2 date/time fields, [DueDate] and [CompleteDate].
I am looking for a way to make the fields on a form act as two seperate fields, one for the date and a second for the time. I have tried having two separate text fields linked to the same date/time field, with one formatted as a date and one formatted as a time, but this has not worked properly.
I cannot modify the existing fields, but I can add additional fields if necessary.
Any thoughts would be greatly appreciated.
Feb 11 '10 #1
2 2008
hedges98
109 100+
I'm just thinking out loud here and am by no means an expert but couldn't you do something like the following:
For DueDate, have that on your form...
Then two text boxes, txtDate and txtTime. Format txtDate to Short Date and txtTime to Long Time.
Change both of their AfterUpdate events to something like
Expand|Select|Wrap|Line Numbers
  1. Me!DueDate.Value = Me!txtDate & " " & Me!txtTime
And it should add the correct information to the DueDate textbox. In theory anyway.
There's almost definitely a better way to do this and I'm not sure if that will bring about an error but it might be worth playing around with something like that

I'm sure an actual expert will wade in and come up with a better solution now!
Feb 12 '10 #2
nico5038
3,080 Expert 2GB
Besides setting the DateTime field after an update as described by hedges98, you'll also need to fill the fields in the form's OnCurrent event.
Personally I would place the (bound) DateTime field on the form but set the visibility to "No".

Nic;o)
Feb 14 '10 #3

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

Similar topics

4
by: Gord | last post by:
Hello, VB6 accepts Date and Time values as 'Date'. I'm trying to verify entry into a database I'm creating by verifying that an appropriate Date or Time value has been entered. Using built-in...
30
by: Dr John Stockton | last post by:
It has appeared that ancient sources give a method for Numeric Date Validation that involves numerous tests to determine month length; versions are often posted by incomers here. That sort of code...
4
by: Joe User | last post by:
Hi all....I have a feeling this is going to be one of those twisted query questions, but here it goes anyways.... I want to generate a report that shows the chronology of events (represented by...
5
by: nick_faye | last post by:
hi, how can i set the dates in a fieldn in my tables in ms access to handle only dates and no time? in creating my table, i set its type to 'date/time' with 'short date' format. but when i...
9
by: MLH | last post by:
I have a database (datatrek.mdb) with a table named DATA. The table has a date/time field with default value = Now(). It has 100 records in it entered over a 50-minute period. I would like the...
1
by: Gee | last post by:
Hi Folks, I have a small database that contains test dates. We can only sit 9 people per test. I need to count the dates that are the same and NOT go over 9. I read MSAcess help on the DCount...
3
by: RSB | last post by:
Hi Every one , IS there any Date Time Control with .Net. All i want to read is the Date and Time in a Single Field like 12/31/2004 09:23:23AM. if there is any then any examples for it. and if not...
2
by: x | last post by:
hi i am a pilot by profession. i want to create a database of my logbook using ms access 2002. i am facing a problem regarding the format of time field. when i select "Data/Time" data type for my...
6
by: Luvin lunch | last post by:
Hi, I'm new to access and am very wary of dates as I have limited experience in their manipulation and I know if they're not done properly things can turn ugly quickly. I would like to use a...
4
by: SilentThunderer | last post by:
Hey folks, Let me start out by letting you know what I'm working with. I'm building an application in VB 2005 that is basically a userform that employees can use to "Clock in". The form...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
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...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
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...

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.