Convert MonthName back to Number or create invisible bound column in listbox

B

Bob

Hi all,

I know you can convert a number into a monthname easily or a full date
into a name easily but can you convert text like Aug, Sep etc back to
8,9?

The reason I want to do this is because I want to show Aug 2006, Sep
2006 in a listbox but I want the listbox value to be 200608 etc. I've
specifically converted an original 200608 into the nice looking Aug
2006 and I want to convert it back but am not sure how to do it. I've
also tried having the recordsouce query have 2 columns (Aug 2006 and
200608) but only display 1 (the Aug 2006) and have the bound column be
the 2nd column, but then the listbox.value is null... Suggestions?

Cheers,

Bob
 
S

storrboy

I would suggest you not convert the date values and apply Formats
instead. Unless you are doing it for some kind of sorting that you
didn't mention I think it's generally eaiser to leave dates as dates .

Format("3/29/07", "mmm yyyy") would produce Mar 2007
Format("3/29/07", "yyyymm") would produce 200703
 

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

Top