B
Bob.Orta
Access 2003, SP3
I have a database that serves as a letter writer. One of the reports
has several unbound controls that are controlled by seperate subs. I
have a need to change the alignment (and content, as always) of one of
the controls based on user selections on a data entry form. Although I
have been coding in Access since version 2.0, I have never had a need
to change a controls alignment property. So, I am unsure of the
syntax to do so. Below is a partial sample of one of my efforts to do
so, but it does not work:
Dim ctl As Control
Set ctl = Me.Controls("txtPara11")
ctl.Properties("txtPara11").TextAlign = "center"
strPara11 = "XXXXXXXXX XXXXXXXXX XXXXXXXXX
XXXXXXXXX XXXXX" & vbCrLf _
& "P.O. Box 9999999" & vbCrLf _
& "Hills, CA 99999-9010" & vbCrLf
.txtPara11 = strPara11
A workaround is to create another UB form and go from there, but I
would prefer not to do so. Code suggestions would be appreciated.
Regards,
Bob
I have a database that serves as a letter writer. One of the reports
has several unbound controls that are controlled by seperate subs. I
have a need to change the alignment (and content, as always) of one of
the controls based on user selections on a data entry form. Although I
have been coding in Access since version 2.0, I have never had a need
to change a controls alignment property. So, I am unsure of the
syntax to do so. Below is a partial sample of one of my efforts to do
so, but it does not work:
Dim ctl As Control
Set ctl = Me.Controls("txtPara11")
ctl.Properties("txtPara11").TextAlign = "center"
strPara11 = "XXXXXXXXX XXXXXXXXX XXXXXXXXX
XXXXXXXXX XXXXX" & vbCrLf _
& "P.O. Box 9999999" & vbCrLf _
& "Hills, CA 99999-9010" & vbCrLf
.txtPara11 = strPara11
A workaround is to create another UB form and go from there, but I
would prefer not to do so. Code suggestions would be appreciated.
Regards,
Bob