A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

"OK" Macro Buttons



 
 
Thread Tools Display Modes
  #1  
Old October 26th, 2006, 08:50 PM posted to microsoft.public.access.forms
Valerie Tubbs
external usenet poster
 
Posts: 1
Default "OK" Macro Buttons

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?


  #2  
Old October 26th, 2006, 09:51 PM posted to microsoft.public.access.forms
fredg
external usenet poster
 
Posts: 4,386
Default "OK" Macro Buttons

On Thu, 26 Oct 2006 14:50:46 -0500, Valerie Tubbs wrote:

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
Please respond only to this newsgroup.
I do not reply to personal e-mail
  #3  
Old October 27th, 2006, 03:06 AM posted to microsoft.public.access.forms
NetworkTrade
external usenet poster
 
Posts: 825
Default "OK" Macro Buttons

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....
--
NTC


"Valerie Tubbs" wrote:

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?



  #4  
Old November 8th, 2006, 08:36 PM posted to microsoft.public.access.forms
Dennis
external usenet poster
 
Posts: 1,222
Default "OK" Macro Buttons

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" wrote:

On Thu, 26 Oct 2006 14:50:46 -0500, Valerie Tubbs wrote:

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
Please respond only to this newsgroup.
I do not reply to personal e-mail

  #5  
Old November 8th, 2006, 08:37 PM posted to microsoft.public.access.forms
Dennis
external usenet poster
 
Posts: 1,222
Default "OK" Macro Buttons

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" wrote:

On Thu, 26 Oct 2006 14:50:46 -0500, Valerie Tubbs wrote:

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
Please respond only to this newsgroup.
I do not reply to personal e-mail

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 01:23 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.