I'm continuing to refine the code of a routine that runs several queries and uses colored labels as indicates of the overall process.
Look at the post by me to see the original problem I had and the solution. It is located at
http://p2p.wrox.com/topic.asp?TOPIC_ID=63777
Now on to the new question...
Is it possible, to call a sub routine, that passes an objects name, and have the sub make changes to the properties of that object.
Example:
If chkCUPMMOF then
Call MakeTable(me.lblCUPMMOF)
End If
The MakeTable sub would look something like
__________
Public Sub MakeTable(lbl As AccessObject, TN as String)
lbl.Caption = "Running"
lbl.BackColor = lngGreen
StrSQL = "01a-qry_" & TN
Call SQL(strSQL)
End Sub
__________
I've tried some variations on this, and I get a Type Mismatch error on most of my attempts. So do I have to use a different option than As AccessObject? Is this even possible?
Thanks in advance
Rood67