Hello,
I'm trying to pass a label as an argument as I have to correct a lot of labels on an access form.
The method is called thus:
Interaction.setLbl Me.partyInfoLabel, partyName
(btw - partyInfoLabel is a label and partyName is a string)
and the method itself looks like this:
Sub setLbl(lbl As Label, val As String)
lbl.Caption = val
End Sub
The error message informs me that there is a type mismatch. I have tried setting ByRef argument, defining lbl as a control, defining lbl as a variant and defining lbl as an object, but I can't seem to put my finger on the 'magic solution'. Is there anyone there who can simply look at this and give me an instant solution?
Thanks,
:S
I'm trying to pass a label as an argument as I have to correct a lot of labels on an access form.
The method is called thus:
Interaction.setLbl Me.partyInfoLabel, partyName
(btw - partyInfoLabel is a label and partyName is a string)
and the method itself looks like this:
Sub setLbl(lbl As Label, val As String)
lbl.Caption = val
End Sub
The error message informs me that there is a type mismatch. I have tried setting ByRef argument, defining lbl as a control, defining lbl as a variant and defining lbl as an object, but I can't seem to put my finger on the 'magic solution'. Is there anyone there who can simply look at this and give me an instant solution?
Thanks,
:S