Format Date Problem

Ice Rhino

Registered User.
Local time
Today, 01:19
Joined
Jun 30, 2000
Messages
210
I have a query which formats the date field I have to mmm yyyy. This result set is accessed by a combo box. When it appears in the list of the combo the format is mmm yyyy. When you make you slection from the list, it reverts the date back to dd/mm/yyyy. I have changed the format of the combo box on the form to be mmm yyyy but this seems to have no effect.

Anybody know what I have done wrong here or can anyone think a workaround to resolve this. Basically I need the displayed contents of the combo box after user selection to remain in the mmm yyyy format. If you reopen the list, all the dates are still in the correct format, it is the one displayed on the form which is wrong once you have moved onto another field.



Kindest Regards
 
Last edited:
You need to set the Format of the combo box on the form.

Brian
 
Hi Brian

I have set the format of the combo to mmm yyyy already. This is the bit I do not understand. Everything from source to display is set to that value and yet it appears to make no difference

Regards
 
Oh yes so you said, sorry, back to the drawing board Brian

Brian
 
Hi Toni

OK just tried it and it works for me, If you haven't closed the db since setting this up humour me close it down and reopen and try again, just grasping at straws really, but since I can change the displays how I like and it works, as I would expect as the underlying data remains a serial number, I'm puzzled by your problem.

Brian
 
The DB has been open and closed many many times

Regards
 
Hi Toni

Since the date/time is carried as a serial number and the Format tells Access how to display that serial number I don't see how the format in one part of the DB can affect the format elsewhere.

I'm sorry I cannot help.

Brian
 
Well now there's a thing, I don't understand this but if you use the Format command in the query say
combofld:format(fldDate,"mmm yyyy") then if the combo box on the form has no format it shows as mmm yyyy but left justified, if you format combo as mmm yyyy it displays right justified as dd/mm yyyy :confused:

I selected the format in my test query as mmm yyyy by setting it in the field properties.

Brian
 
I found exactly the same thing yesterday on another date field I was working on, however I did not actually get as far as you in the detection of what causes it or the logical steps to recreate it.

Ummmm, Microsoft Feature I guess. Unless it is similar to the Excel thing where certain data types are left or right justified.

Not sure?????
 
Well text is left justified but I'm just perplexed, I'm off home shortly and not back till Monday shall check to see if one of the more knowledgeable has explained.

cheers Brian
 
Thanks for you help Brian today, mucho appreciated

Regards
 

Users who are viewing this thread

Back
Top Bottom