Method or Data Object Not Found

D

DS

I get the Method or Data Object message..... on Tag.
How can I fix this?
Thanks
DS

For Each Ctl In Me.Controls
If Ctl.Tag = "1" Then
Ctl.Visible = True
End If
Next Ctl
For Each Ctl In Me.Controls
If Ctl.Tag = "2" Then
Ctl.Visible = False
End If
Next Ctl
 
R

RoyVidar

DS said:
I get the Method or Data Object message..... on Tag.
How can I fix this?
Thanks
DS

For Each Ctl In Me.Controls
If Ctl.Tag = "1" Then
Ctl.Visible = True
End If
Next Ctl
For Each Ctl In Me.Controls
If Ctl.Tag = "2" Then
Ctl.Visible = False
End If
Next Ctl

Is Ctl declared as Control? What is the type of control when you get
the message, and does that control type have a .Tag property?
 
D

DS

RoyVidar said:
Is Ctl declared as Control? What is the type of control when you get
the message, and does that control type have a .Tag property?
Yes I have Dim Ctl As Control
Its on an Image

It works fine on one machine but not on another. does the Microsoft
Access Lirary have anything to do with this?
Thanks
DS
 
R

RoyVidar

DS said:
Yes I have Dim Ctl As Control
Its on an Image

It works fine on one machine but not on another. does the Microsoft
Access Lirary have anything to do with this?
Thanks
DS

If you have reference problems, it can give problems which seems
completely unrelated. Here's Allen Brownes page on reference issues
http://allenbrowne.com/ser-38.html with a couple of additional links.
 
D

DS

RoyVidar said:
If you have reference problems, it can give problems which seems
completely unrelated. Here's Allen Brownes page on reference issues
http://allenbrowne.com/ser-38.html with a couple of additional links.
Problem found.
The Option Compare Database
Option Explicit Statement was missing from the top of the form, why or
how I don't know. Thank you for your input.
DS
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top