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 sizbut on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

defaultvalue and zero suppression 2

Status
Not open for further replies.

BitZero

Programmer
Mar 11, 2008
100
US
I have a combo box on a form so the user can select from a list of part numbers. It's an alpha/numeric field of length 10. I have this logic in the change event:

me.cmb_part.defaultvalue = me.cmb_part.value

This works just fine if the part number is something like AB123, or 12345. But if the part number is 01234, then what get's displayed as the default for the next record is 1234. The zero is suppressed. How can I prevent the zero from being suppressed? The format property is blank, and I'm using Access 2003.

Thanks
 
Try:
me.cmb_part.defaultvalue = """ & me.cmb_part.value & """"

(RG for short) aka Allan Bunch MS Access MVP acXP ac07 winXP Pro
Please respond to this forum so all may benefit
 
That worked! (and you can quote me on that)

Thanks

 
Glad I could help.

(RG for short) aka Allan Bunch MS Access MVP acXP ac07 winXP Pro
Please respond to this forum so all may benefit
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top