"OK" Macro Buttons

  • Thread starter Thread starter Valerie Tubbs
  • Start date Start date
V

Valerie Tubbs

I have followed the help instructions to the letter on creating a macro to
run the "OK" button on a form created to enter report criteria. The action
type on the macro is set to "SetValue", the Item is set to "[Visible]", and
the Expression is set to "No".......which is exactly how the instructions
read on how to set this up. However, everytime the macro tries to run, I
get the following error: "You entered an expression that has an invalid
reference to the property Visible. The property may not exist or may not
apply to the object specified."

Can anyone make any recommendations?
 
I have followed the help instructions to the letter on creating a macro to
run the "OK" button on a form created to enter report criteria. The action
type on the macro is set to "SetValue", the Item is set to "[Visible]", and
the Expression is set to "No".......which is exactly how the instructions
read on how to set this up. However, everytime the macro tries to run, I
get the following error: "You entered an expression that has an invalid
reference to the property Visible. The property may not exist or may not
apply to the object specified."

Can anyone make any recommendations?

Yes. I would recommend that you use code.
You wish to make a form not visible using a command button on that
form?
On that command button's property sheet, select the Event tab.
Click on the Click event line and enter [Event Procedure]

Then click on the button with the 3 dots that appears on that line.
When the code window opens, the cursor will be flashing between 2
already written lines of code.
Between those 2 lines, write:

Me.Visible = False

Save the changes by exiting the window.
That should do it.
 
Fred's advice is a-ok.

What I notice from your post is you state:
"... the "OK" button on a form created to enter report criteria..."

So you are pressing a button on a Form that is to make a Report not visible?

Your error message is telling you that the object you are attempting to make
not visible can not be made not visible....
 
Hey fred, I tried the recommendations you gave Valerie but I don't get any
results, could give me a bit more details on how to fix this problem? Right
now I have in the "On Click" event the macro for the OK button. What should
I do?

thanx for the help, Dennis.

fredg said:
I have followed the help instructions to the letter on creating a macro to
run the "OK" button on a form created to enter report criteria. The action
type on the macro is set to "SetValue", the Item is set to "[Visible]", and
the Expression is set to "No".......which is exactly how the instructions
read on how to set this up. However, everytime the macro tries to run, I
get the following error: "You entered an expression that has an invalid
reference to the property Visible. The property may not exist or may not
apply to the object specified."

Can anyone make any recommendations?

Yes. I would recommend that you use code.
You wish to make a form not visible using a command button on that
form?
On that command button's property sheet, select the Event tab.
Click on the Click event line and enter [Event Procedure]

Then click on the button with the 3 dots that appears on that line.
When the code window opens, the cursor will be flashing between 2
already written lines of code.
Between those 2 lines, write:

Me.Visible = False

Save the changes by exiting the window.
That should do it.
 
Hey fred, I tried the recommendations you gave Valerie but I don't get any
results, could give me a bit more details on how to fix this problem? Right
now I have in the "On Click" event the macro for the OK button. What should
I do?

thanx for the help, Dennis.

fredg said:
I have followed the help instructions to the letter on creating a macro to
run the "OK" button on a form created to enter report criteria. The action
type on the macro is set to "SetValue", the Item is set to "[Visible]", and
the Expression is set to "No".......which is exactly how the instructions
read on how to set this up. However, everytime the macro tries to run, I
get the following error: "You entered an expression that has an invalid
reference to the property Visible. The property may not exist or may not
apply to the object specified."

Can anyone make any recommendations?

Yes. I would recommend that you use code.
You wish to make a form not visible using a command button on that
form?
On that command button's property sheet, select the Event tab.
Click on the Click event line and enter [Event Procedure]

Then click on the button with the 3 dots that appears on that line.
When the code window opens, the cursor will be flashing between 2
already written lines of code.
Between those 2 lines, write:

Me.Visible = False

Save the changes by exiting the window.
That should do it.
 

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

Back
Top