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

Properties on Controls, changing by using the OnFormat event 1

Status
Not open for further replies.

dfwelch

Programmer
Dec 5, 2003
51
US
I have the following code to move the License1, Label9, Unavailable1, and License2 controls on my report for one record out of 110. It works prefectly for this record and does not affect any of the records UP TO this one. However, it seems to be affecting all the records AFTER this one. I've tried adding an Else, but I don't know what "undoes" the property changes. I tried Default, but didn't work.

Code:
If SOC = "21-1011" Then
    Me.License1.Top = 7200
    Me.Label9.Top = 7800
    Me.Unavailable1.Top = 8300
    Me.License2.Top = 7450
End If
 
You will have to set the values back to whatever the original value were at design time. To see what the value is in twips, temporarily place code like this in the OnOpen event of your report:
Code:
Dim valtop As Integer
valtop = Me.val.Top
MsgBox (valtop)
After obtaining the value you can comment out / remove the code....

Hoc nomen meum verum non est.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top