Right justified field displays left justified

D

Dennis

Hi,

I'm on Access via Office XP Pro.

I have a continuous form. That form has a text box control that I load as
the result of a choice in a combo box.

The combo box has a drop down list of class number and dates. When the user
chooses a class, I extract the number of availabe slot (and format the data)
by :

intNoOpen = Nz(Me.cboClassNo.Column(6), 0)
If intNoOpen = 0 Then
Me.txtOpenClosed.ForeColor = 185 ' Class closed - Bright
Red
Me.txtOpenClosed.FontBold = True
Else
Me.txtOpenClosed.ForeColor = 4227072 ' Class open - Bright
Green
Me.txtOpenClosed.FontBold = True
End If
Me.txtOpenClosed = TrimCStr(intNoOpen))

It works ok, but he problem is the Me.txtOpenClosed data is display *left*
justifiied instead of rigth justified. I look at the Text Align property for
this control and it is set to Right.

I also looked at the data in debugger and the data does not appear to have
any trailing spaces. The debugger shows the value as "8".

Any suggestions?

Thanks,

Dennis
 
M

Maurice

Just a guess but try adding the following line to the if statement:

me.txtOpenClosed.textalign=3

this will rightalign the text. But since the standard setting isn't working
i'm not sure if this will present you with the expected result. Another trick
could be to set the focus to another control first and then set the textalign
to the textbox.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top