A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

ComboBox formatting



 
 
Thread Tools Display Modes
  #1  
Old May 20th, 2010, 04:05 PM posted to microsoft.public.access.forms
Mark
external usenet poster
 
Posts: 1,534
Default ComboBox formatting

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?
  #2  
Old May 21st, 2010, 02:38 AM posted to microsoft.public.access.forms
Lord Kelvan
external usenet poster
 
Posts: 637
Default ComboBox formatting

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
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 02:59 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.