bakershawnm
Programmer
I have been searching for a couple of days and have not found anything that tells me I cannot do this. However I have not found anything that tells me I can either.
I am using Access 2007. I am drawing a series of circles on a form using the detail.print event. with those circles I need 2 labels with each. I have the labels hidden on the report. I can move them initially in the report.load event but the locations of the circles may change with each record. I need the labels to move when the circles move.
What ever I try I get the 2101 error "The setting you entered isn't valid for this property".
I have tried calling the .load event from the detail.print event but that doesn't work.
I tried setting the Left and Top properties inside the .print event but got the error. This is actually the same code that is in the .Load event and it work there.
pincntrl = "Label" & (266 + x)
Me(pincntrl).Left = (pinHCtr + sngRadius)
Me(pincntrl).Top = (pinVCtr - (250 + sngRadius))
I then tried using the control.move function, got the error.
pincntrl = "Label" & (266 + x)
Me(pincntrl).move (pinHCtr + sngRadius), (pinVCtr - (250 + sngRadius))
I thought maybe it was the way I was referencing the control so I tried this instead. ll and lt are dim'd as variants
For Each c In Me.Controls
If c.Name = "Label" & 266 + x Then
ll = (pinHCtr + sngRadius)
lt = (pinVCtr - (250 + sngRadius))
c.move ll, lt
End If
Next
So I thought maybe based on this
that maybe I should try this
For Each c In Me.Controls
If c.Name = "Label" & 266 + x Then
ll = (pinHCtr + sngRadius)
lt = (pinVCtr - (250 + sngRadius))
call movecntrl(c, ll, lt)
End If
Next
Sub movecontrol(ByVal cntrl As Object, ByVal Lft As Variant, ByVal Tp As Variant)
cntrl.Move Lft, Tp
End Sub
Still got the 2101 error.
Am I being an idiot on this and trying to do something that is impossible? Or am approaching this from the wrong perspective?
Thanks in advance for any help.
shawn
I am using Access 2007. I am drawing a series of circles on a form using the detail.print event. with those circles I need 2 labels with each. I have the labels hidden on the report. I can move them initially in the report.load event but the locations of the circles may change with each record. I need the labels to move when the circles move.
What ever I try I get the 2101 error "The setting you entered isn't valid for this property".
I have tried calling the .load event from the detail.print event but that doesn't work.
I tried setting the Left and Top properties inside the .print event but got the error. This is actually the same code that is in the .Load event and it work there.
pincntrl = "Label" & (266 + x)
Me(pincntrl).Left = (pinHCtr + sngRadius)
Me(pincntrl).Top = (pinVCtr - (250 + sngRadius))
I then tried using the control.move function, got the error.
pincntrl = "Label" & (266 + x)
Me(pincntrl).move (pinHCtr + sngRadius), (pinVCtr - (250 + sngRadius))
I thought maybe it was the way I was referencing the control so I tried this instead. ll and lt are dim'd as variants
For Each c In Me.Controls
If c.Name = "Label" & 266 + x Then
ll = (pinHCtr + sngRadius)
lt = (pinVCtr - (250 + sngRadius))
c.move ll, lt
End If
Next
So I thought maybe based on this
that maybe I should try this
For Each c In Me.Controls
If c.Name = "Label" & 266 + x Then
ll = (pinHCtr + sngRadius)
lt = (pinVCtr - (250 + sngRadius))
call movecntrl(c, ll, lt)
End If
Next
Sub movecontrol(ByVal cntrl As Object, ByVal Lft As Variant, ByVal Tp As Variant)
cntrl.Move Lft, Tp
End Sub
Still got the 2101 error.
Am I being an idiot on this and trying to do something that is impossible? Or am approaching this from the wrong perspective?
Thanks in advance for any help.
shawn