Item - visible

  • Thread starter Thread starter HW
  • Start date Start date
H

HW

Hello:

I am new to access and I am trying to create a simple OK
macro. I have the setvalue action as Item = [Visible]
Expression = No. I have set the OnClick for the command
button on the form to this Ok macro. When I click ok I
get the following: "The object doesn't contain the
Automation object 'visible'." What am I doing wrong.

Thanks in advance.

Howard
 
I am a real newbie... so go slow.

I entered the following in Item field of the macro -
[Forms]![Sales data]![OK].[Visible]

When I save and run the macro I now get the following -
Microsoft Access can't find the form 'Sales data' in a
macro expression... I checked to make sure the form
exists. What am I doing wrong now?

Thanks again
Howard
-----Original Message-----
If you are trying to set the Visible property of a control (such as a text
box) on your form, you might use these parameters in your macro:

Item = [Forms]![NameOfForm]![NameOfControl].[Visible]
Expression = True or False

HW said:
Hello:

I am new to access and I am trying to create a simple OK
macro. I have the setvalue action as Item = [Visible]
Expression = No. I have set the OnClick for the command
button on the form to this Ok macro. When I click ok I
get the following: "The object doesn't contain the
Automation object 'visible'." What am I doing wrong.

Thanks in advance.

Howard
.
 
Are you sure the name of the form has a space in it? And what kind of
control is "OK"?

HW said:
I am a real newbie... so go slow.

I entered the following in Item field of the macro -
[Forms]![Sales data]![OK].[Visible]

When I save and run the macro I now get the following -
Microsoft Access can't find the form 'Sales data' in a
macro expression... I checked to make sure the form
exists. What am I doing wrong now?

Thanks again
Howard
-----Original Message-----
If you are trying to set the Visible property of a control (such as a text
box) on your form, you might use these parameters in your macro:

Item = [Forms]![NameOfForm]![NameOfControl].[Visible]
Expression = True or False

HW said:
Hello:

I am new to access and I am trying to create a simple OK
macro. I have the setvalue action as Item = [Visible]
Expression = No. I have set the OnClick for the command
button on the form to this Ok macro. When I click ok I
get the following: "The object doesn't contain the
Automation object 'visible'." What am I doing wrong.

Thanks in advance.

Howard
.
 
G, If Sales Data is a subform then you need to reference it like so(change names as required):
[Forms]![MainFormName]![Sales data].[Form]![OK].[Visible]

Or if you want to use code, simply click the ellipsis(...) next to the on click event of your
command button and type in the following:

Me.MyMainForm![Sales data].Form.[OK].Visible = False

Hope this helps!

--
Reggie

----------
Mister G said:
Are you sure the name of the form has a space in it? And what kind of
control is "OK"?

HW said:
I am a real newbie... so go slow.

I entered the following in Item field of the macro -
[Forms]![Sales data]![OK].[Visible]

When I save and run the macro I now get the following -
Microsoft Access can't find the form 'Sales data' in a
macro expression... I checked to make sure the form
exists. What am I doing wrong now?

Thanks again
Howard
-----Original Message-----
If you are trying to set the Visible property of a control (such as a text
box) on your form, you might use these parameters in your macro:

Item = [Forms]![NameOfForm]![NameOfControl].[Visible]
Expression = True or False

:

Hello:

I am new to access and I am trying to create a simple OK
macro. I have the setvalue action as Item = [Visible]
Expression = No. I have set the OnClick for the command
button on the form to this Ok macro. When I click ok I
get the following: "The object doesn't contain the
Automation object 'visible'." What am I doing wrong.

Thanks in advance.

Howard

.
 
The "OK" is a macro attached to a command button on the
form. After the user has selected the criteria, they hit
the OK button and the form is no longer visable and a
report is viewed. All of the other macro's work,except
for this "OK" macro/button.

Howard
-----Original Message-----
Are you sure the name of the form has a space in it? And what kind of
control is "OK"?

HW said:
I am a real newbie... so go slow.

I entered the following in Item field of the macro -
[Forms]![Sales data]![OK].[Visible]

When I save and run the macro I now get the following -
Microsoft Access can't find the form 'Sales data' in a
macro expression... I checked to make sure the form
exists. What am I doing wrong now?

Thanks again
Howard
-----Original Message-----
If you are trying to set the Visible property of a control (such as a text
box) on your form, you might use these parameters in
your
macro:
Item = [Forms]![NameOfForm]![NameOfControl].[Visible]
Expression = True or False

:

Hello:

I am new to access and I am trying to create a
simple
OK
macro. I have the setvalue action as Item = [Visible]
Expression = No. I have set the OnClick for the command
button on the form to this Ok macro. When I click ok I
get the following: "The object doesn't contain the
Automation object 'visible'." What am I doing wrong.

Thanks in advance.

Howard

.
.
 
Howard, I would do away with the macro and instead of setting the click event of your command button
to the macro name set it to [Event Procedure]. Click the ellipsis(...) to launch the code window
and type in something like this:

Private Sub cmdOK_Click()
Docmd.OpenReport, "rptName"
Me.Visible = False
End Sub


--
Reggie

----------
Howard said:
The "OK" is a macro attached to a command button on the
form. After the user has selected the criteria, they hit
the OK button and the form is no longer visable and a
report is viewed. All of the other macro's work,except
for this "OK" macro/button.

Howard
-----Original Message-----
Are you sure the name of the form has a space in it? And what kind of
control is "OK"?

HW said:
I am a real newbie... so go slow.

I entered the following in Item field of the macro -
[Forms]![Sales data]![OK].[Visible]

When I save and run the macro I now get the following -
Microsoft Access can't find the form 'Sales data' in a
macro expression... I checked to make sure the form
exists. What am I doing wrong now?

Thanks again
Howard

-----Original Message-----
If you are trying to set the Visible property of a
control (such as a text
box) on your form, you might use these parameters in your
macro:

Item = [Forms]![NameOfForm]![NameOfControl].[Visible]
Expression = True or False

:

Hello:

I am new to access and I am trying to create a simple
OK
macro. I have the setvalue action as Item = [Visible]
Expression = No. I have set the OnClick for the
command
button on the form to this Ok macro. When I click ok I
get the following: "The object doesn't contain the
Automation object 'visible'." What am I doing wrong.

Thanks in advance.

Howard

.
.
 
Back
Top