Date And Time

tails

Board Regular
Joined
Jan 30, 2005
Messages
130
Hey ppl
I've created a database and am using a form for the users of my system to use. i have a seperate date and time text boxes and i want to make it so that as soon as the form loads the data and time are automatically entered into it for them. i have it already set to a Dataentry so that they are only entering data, but there seems to be a problem with the date and time test boxes as users can put in incorrect dates or times to make it seem more urgent for me to get to them. is it possible to make it so that it automatically inputs the date and time when they load it up.
ive tryed using
Date = Date & Now
Time = Time & Now
but it seems to enter both of them into each box, like it imputs 8/2/2005 1:14:37pm and its kinda annoying when it does this
Your help would be greatly appreciated.
 

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.
Hi
Try using default values of =Date() in the date field and =Time() in the time field and set the "Enabled" properties for both boxes to "No".
HTH, Andrew. :)
 
Upvote 0
date and time

Ok it didn't seem to work,
If just ended up putting both the time and the date in the one field, until i can get a better option. it works fine but i would rather them in seperate fields so i can read them easy, and make it more user friendly
if you can think of anything else it would help heaps.
thanks
 
Upvote 0
Im not using defualt values i dont think. Like dont get me wrong i'm not very good with access I'm normally a VB (visual basic) person, not really a database person, so i could well be using default values. What are they?

The program is a DataEntry form for the users, they open up a form on the desktop and when it opens up it IS meant to automatically input the date and time for them when they open the program. but it wont do it in seperate text boxes, it puts them both in the one box. It should work like this for the mean time but i would rather have them in individual text boxes.
 
Upvote 0
{Edited spelling}

Hi, if you go into the design of your form, there should be 2 separate text boxes linked back to the fields in the underlying table - one for the date and the other for the time. If this is not the case then there is your issue. You will need to have the 2 fields set up in the underlying table that are then passed through to the form (possibly via a query).

If you do have 2 separate text boxes and assuming the first has been assigned to the date, right click the text box (while in form design) -> Click Properties -> Data. The first item (Control Source) should link the text box back to the table and the third item is for the default value. Change the default value to "=Date()" (without the quotes) and also make sure the first box (Control Source) is actually linked back into the table (click the down arrow to see the choices). Right click the time box and do the same things, but the default value should be "=Time()" (again without the quotes) and set the Control Source to the "time" field in your table.

HTH, Andrew. :)
 
Upvote 0
Thanks for that, that help heaps. Fixed another problem i had at the same time... lol
well now that it works, i think i might just go back to it.
Enjoy...
 
Upvote 0
I'm pleased it worked. If you don't want the users changing the date or the time (per your original request) set the "Enabled" property for both boxes to "No". You can access that through the Form Design -> Right Click Date Box -> Properties -> Data -> Enabled -> No. Repeat for the Time box.
Andrew :)
 
Upvote 0
yeah thats fine, i've already done that, but i just coded it in. See thats my area of work. i dont like access very much, it keeps having problems. now it doesn't wanna load the picture i set for it on other machines... lol but oh well i can figure that out. its got to do with the drive mapping...
access is a good program, but has way to many problems...
im gonna go insane if it keeps this up :devilish:
 
Upvote 0

Forum statistics

Threads
1,221,849
Messages
6,162,425
Members
451,765
Latest member
craigvan888

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top