ComboBox formatting

M

Mark

Hi All,

In a query I formated a field to allow the sorting to come out in sequence.
x = 4
Number: format(x,"000000")

I have combo box based on this query and I would like to be able to type in
4 without the leading zero's. However it errors when doing so. I have tried
to use: cbConAudit_id = Format(cbConAudit_id, "000000") on after update, on
dirty, on change, but nothing is working. I've also used the format in the
properties using 000000, but still errors.

Is there a way to keep from adding the leading zeros?
 
L

Lord Kelvan

why dont you change for field to int rather than butchering the text
field and that will order it as a number rather than ordering it as
text

ie use cint(fieldname) in your rowsource

eg

select cint(numberfieldwhichistext),otherfields from the table
 

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