rookie question.....

vagelisr

Registered User.
Local time
Today, 02:19
Joined
Apr 28, 2011
Messages
87
Hi to all.......

I have two fields that fill automatically.
One date field and one time field
I want if the date is not the current date to ask the user the time.
Is there any way to do this without use a form?


Thanks and regards
 
Vagelisr

It helps to know what version you are using.

Suggest you put something in your Signature.

Like

Windows 7 Access 2007 or whatever you are using.

If you are not using a form what are you using?

How do these fields get populated and from where.

Will try to help when I get more information.
 
Absolutely correct my friend.
Access 2003 with SP3.
I was wondering if this is (to take back the time) possible to be done with something similar to msgbox.

Thanks again for your time!!!!!!
 
What "Time" are you asking the user for? if it's the current time, why not use the NOW() function which returns the current date and time?

debug.Print format(now(), "hh:mm:ss")

returns the current time only.
 
I dont want the current time.
I want from the user to give the time
 
Hi to all.......

I have two fields that fill automatically.
One date field and one time field
I want if the date is not the current date to ask the user the time.
Is there any way to do this without use a form?

There would be different solutions for different situations. You need to explain the problem in a little bit more detail.

Need to know what you are using? Table,Query,Form or even Code.

How do the fields get populated. Is the Data imported in bulk or are you using one record at a time.
 
The InputBox function may give what you need.

An inputbox would be my option of absolute last resort

If I enter 4.30 and the next guy enters 4:30, what happens?

And do I mean 4:30am or 16:30? what if I write 4:30pm?
 
Is there any way to do this without use a form?
Not only can't but shouldn't! Data should always be entered through a Form, never directly into the Table. The Access Form Wizard will be glad to generate a Form for you from your Table in half a minute!

You've already been asked twice, how do these fields get populated and from where? If you want us to help you really must give us an answer!

Linq ;0)>
 
Those issues can be handled programmatically with a little thought. As you say, there's no telling what the user might enter, so you must cater for each likely possibility and have a re-prompt message if it's not possible to decode. Your constraint of not using a form limits the options. You can try the TimeValue function as an initial determinant of the result, but this is not foolproof (or user proof!).
 

Users who are viewing this thread

Back
Top Bottom