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

how to format cell in query

Status
Not open for further replies.

leeroi

Technical User
Jun 5, 2000
122
US
Is there a way to format a column in query datasheet view so that the cell contents are centered rather than left aligned?

Lee
 
[tt]Asc(Right(Referrals.ICD1 & ' ',1))[/tt]

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Now it's getting bizarre. Instead of pulling data from the ICD1 field, the code populates the field with the same data ("32"), for every record in the query. Actual field data should be 4 to 5 characters long and include numbers and a decimal- e.g., 315.5, 286.90, etc.
 
32 is the ASCII code for space, so my guess was wrong.
Anyway, trying to center 5 characters long numbers in a 6 characters long field is amazing me ...

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
No, the default field size is set for 50 characters. My data is only 5 to 6 characters.

Lee
 
As you've found, it's not exactly a snap to format data in a query's datasheet output. Sounds like you might be a spreadsheet jockey hoping to make this query output more "presentable" - and I'm not trying to make light of that, it's just that queries extract data and do calculations - they're just not designed to be "presentation-worthy". The only straightforward way to do this, depending on where the output is really going, is to use a form or a report, both of which support all the usual formatting options.

--------------------------------------
"For a successful technology, reality must take precedence over public relations, for Nature cannot be fooled." - Richard P. Feynman
 
It was really more of a "want" than a "need"- a lot of our data really doesn't even need a report- a query works fine, except that visually the data is sometimes a little more tiresome on the eyes due to the lack of formatting options. Oh well, thanks for giving it a shot!

Lee
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top