Formatting multiple columns in a combo box

  • Thread starter Thread starter DubboPete
  • Start date Start date
D

DubboPete

Hi all,

Is it possible to change the formatting of a third column in a 4-
column combo box from 20051965 to 20/05/1965, just to make recognition
easier?

20051965 is a date value, and any format to make it easier to read
would help, ie, could be 20-05-1965, 20/05/1965, or even 20-May-1965!

tia

DubboPete
 
If the third column is a date value from a table then design the table
format as shortdate, for instance, and give it an input mask.

HTH
Damon
 
In the RowSource of the combo, specify the format you want.

From your example, I take it that the field is a Number (Long Integer).
So instead of:
SELECT F1, F2, F3 FROM Table1;
you would use:
SELECT F1, F2, Format([F3], "00\/00\/0000") AS FakeDate FROM Table1;

If you want the month name, use Left(), Mid(), Right() to parse the parts,
DateSerial() to create the date, and then Format() with "Medium Date".
 
In the RowSource of the combo, specify the format you want.

From your example, I take it that the field is a Number (Long Integer).
So instead of:
SELECT F1, F2, F3 FROM Table1;
you would use:
SELECT F1, F2, Format([F3], "00\/00\/0000") AS FakeDate FROM Table1;

If you want the month name, use Left(), Mid(), Right() to parse the parts,
DateSerial() to create the date, and then Format() with "Medium Date".

--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users -http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.






Is it possible to change the formatting of a third column in a 4-
column combo box from 20051965 to 20/05/1965, just to make recognition
easier?
20051965 is a date value, and any format to make it easier to read
would help, ie, could be 20-05-1965, 20/05/1965, or even 20-May-1965!

DubboPete- Hide quoted text -

- Show quoted text -

Hi Allen,

The formatting works, as in 00/00/0000, however, it screws up the
year! Looks like it's displaying julien as opposed to actual - for
instance I'm getting dates such as 25/01/7124!

Any clues how to fix that snappy little sucker?

Pete
 
If the third column is a date value from a table then design the table
format as shortdate, for instance, and give it an input mask.

HTH
Damon








- Show quoted text -

Thanks Damon, but I don't have rights to alter the table structure
(which is ok with me), so coding has to be the way to go

cheers
Pete
 
In the RowSource of the combo, specify the format you want.
From your example, I take it that the field is a Number (Long Integer).
So instead of:
SELECT F1, F2, F3 FROM Table1;
you would use:
SELECT F1, F2, Format([F3], "00\/00\/0000") AS FakeDate FROM Table1;
If you want the month name, use Left(), Mid(), Right() to parse the parts,
DateSerial() to create the date, and then Format() with "Medium Date".
- Show quoted text -

Hi Allen,

The formatting works, as in 00/00/0000, however, it screws up the
year! Looks like it's displaying julien as opposed to actual - for
instance I'm getting dates such as 25/01/7124!

Any clues how to fix that snappy little sucker?

Pete- Hide quoted text -

- Show quoted text -

Hi Allen,

You on holidays ? <grin>. Still stuck with the formatting/year
problem....

Pete
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top