combo box question

Jon123

Registered User.
Local time
Today, 16:22
Joined
Aug 29, 2003
Messages
668
I have a combo box on a form that is used to get a Date. The problem is the table is storing the date and time. Is there a way I can drop the time from the combo and only show the date ???

jon
 
Hi Jon,
Jon you can do it while using form... In form design view... goto combo properties...
In format tab, select from format box which format you want... you can select LONG DATE, MEDIUM DATE or SHORT DATE, it will hide the time form your combo box...
Hope it will work...
 
It does hide it after you select 1. How do I hide it before selecting it.

So if I click on it and there are 3 dates it looks like this
7/10/2009 8:00:00
7/12/2009 10:00:00
7/15/2009 7:00:00

Once I select 1 the field box does drop the time but I want to drop it
for the look up

jon
 
What about basing the combo on a query and make a field in the query based on Left() to extract the date portion?
 
[abc] is the field with the date and time.

Left([abc],10) The 10 (or whatever number is used) would be the number of characters extracted from the left and would work for my dates.

You can also base it on the position of the space.

InStr() will find the position of the space between the date and time

7/10/2009 8:00:00

InStr is best when the number of characters in the date varies.

If you search on InStr and Left, Right and Mid you will find heaps of stuff on them with examples.
 
Or, in the same query, you can simply format the field.

ListedTime = format([FieldNameHere],"mm-dd-yyyy")
 

Users who are viewing this thread

Back
Top Bottom