Change format on Combo-box

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

Marshal if you are out there I need some help again , or maybe others have
an idea..

I had a problem earlier where I need to change the field format for a field
ona coninous form - where the format was dependant on the item type.
Marshal, thanks for the response it works great ... BUT...

Now I have the smae field on a conimuous form as a combo Box -- cna't seem
to figure this one out.. thanlks..

wAyne_
 
I had a problem earlier where I need to change the field format for a
field ona coninous form - where the format was dependant on the item
type. Marshal, thanks for the response it works great ... BUT...

Use the OnCurrent event to set the format for the control?

private sub form_current()
if isnull(txtMyField) then
txtMyField.Format = "" ' clear the format

elseif not isdate(txtMyField) then
' give Excel users something familiar...
txtMyField.Format = """###""@""###"""

elseif cdate(txtMyField)< Date() Then
' use full dates for historic dates
txtMyField.format = "yyyy\-mm\-dd"

else
' use short dates for near future
txtMyField.format = "mm/dd"

end if
end sub

Hope that helps


Tim F
 
Back
Top