Formatting a field in an access query

accessaspire219

Registered User.
Local time
Yesterday, 18:02
Joined
Jan 16, 2009
Messages
126
I need to format a field in my query as a number. Does anyone how this can be done?
Thanks!
 
if you highlight the coumn in your query and click Properties, you should then see a format spot that you can change.
 

Attachments

  • format ex.gif
    format ex.gif
    53.5 KB · Views: 124
I find the properties option can be unreliable.

I would try this... int([YourField])
 
I find the properties option can be unreliable.
I would try this... int([YourField])

What does the Int syntax mean? Why do you find the properties option unreliable; with the right wording shouldn't it work? How do you tell it to change the backcolor? using this syntax as opposed to "Me.combobox.backcolor=" ?
 
Use

CInt([Field]) to convert to Integer
CLng([Field]) to convert to Long Integer
CStr([Field]) to convert to String
CDbl([Field]) to convert to a Double
CSng([Field]) to convert to a Single
CBool([Field]) to convert to a Boolean
CCur([Field]) to convert to Currency
 
Oh. Shoot! I thought I was seeing the response to different answer i gave! Blonde moment.
 
I have a similar problem...I am making a table from another table and in my first table I have a field with phone numbers that are formatted like (xxx) xxx-xxxx (US) but when the new table is created, the phone number field is not formatted in that way, it comes out xxxxxxxxxx...how do I get the field in the second table to be the right format without having to reset it manually every time?
 

Users who are viewing this thread

Back
Top Bottom