Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

format problem 1

Status
Not open for further replies.

VickyC

Technical User
Sep 25, 2010
206
CA
I have a combobox whose Row Source is filled using code like...
strRS = "SELECT DateSerial(Year(BinDate),Month(BinDate),1) AS BinMonth FROM... etc

Once a selection is made, I want it to appear in the combobox as, for example... Oct, 2010

My problem is that it always appears, for example, as 10/1/2010. I can't seem to get the value formatted properly. Using mmm", "yyyy in the format property doesn't seem to have any effect. Any ideas??

thank you
Vicky
 
Try:
Code:
SELECT DateSerial(Year(BinDate),Month(BinDate),1) AS BinMonth, Format(DateSerial(Year(BinDate),Month(BinDate),1),"mmm, yyyy") TheMonth FROM... etc
Set the column count to 2 and the column widths to 0",0.5".


Duane
Hook'D on Access
MS Access MVP
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top