Formatting a field in an access query (1 Viewer)

accessaspire219

Registered User.
Local time
Today, 17:54
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!
 

Kryst51

Singin' in the Hou. Rain
Local time
Today, 17:54
Joined
Jun 29, 2009
Messages
1,896
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: 95

Togwda

New member
Local time
Today, 15:54
Joined
Jul 22, 2009
Messages
3
I find the properties option can be unreliable.

I would try this... int([YourField])
 

Kryst51

Singin' in the Hou. Rain
Local time
Today, 17:54
Joined
Jun 29, 2009
Messages
1,896
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=" ?
 

boblarson

Smeghead
Local time
Today, 15:54
Joined
Jan 12, 2001
Messages
32,059
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
 

Kryst51

Singin' in the Hou. Rain
Local time
Today, 17:54
Joined
Jun 29, 2009
Messages
1,896
Oh. Shoot! I thought I was seeing the response to different answer i gave! Blonde moment.
 

barlee

Registered User.
Local time
Today, 15:54
Joined
Nov 18, 2006
Messages
30
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

Top Bottom