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

Format query field to right justify

Status
Not open for further replies.

BMeek

Programmer
Sep 18, 2000
70
0
0
US
I am working on a query that provides data for a chart and I need to right justify the data field so the chart axis labels are right justified. I am using the following text string to force a line break between agent name and their firm name.

Example: AgentName: [AgentLast] & ", " & [AgentFirst] & Chr(13) & Chr(10) & [FirmName]

How can I format this string to be right justified?

Bryan Meek
bmeek@adelphia.net
 
Thanks HitechUser,
Actually I found that if I opened up the query in design view, then pulled up the field properties I can place a "?" in the format line and it automatically right justifies both lines in the string.

Thanks again for the response.

Bryan Meek
bmeek@adelphia.net
 
Bryan,

Hey thanks. I did not know that!

Learn something new everday...

 
HiTechUser and others,
I've run into a snag with right aligning my text. The ? in the format property aligns the text in the query builder results but not after the query runs and populates the chart axis.

I still need some assistance getting the chart axis right aligned. I've tried using RSET but it doesn't work within the query builder since it is called by an OnClick event and not via VBA code. If anyone has suggestions I'd appreciate any new thoughts on the process.

Bryan Meek
 
AgentName: Right(" " & [AgentLast] & ", " & [AgentFirst], 30) & Chr(13) & Chr(10) & Right(" " & [FirmName], 30)

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
PH,
Thanks for the response, however formatting query results is a lot easier than getting the same formatting to apply once the data is in the chart object. Your suggestion still doesn't get me the desired results of having both lines of text right aligned once the chart is opened and displayed.

If anyone has another suggestion I would love to hear it.


Bryan Meek
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top