Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 519
  • Last Modified:

access make one checkbox invisible if another is checked

I attach dtabase
go to form
go to tab RHK. see check box completion checked by rhk
go to tab Karan- see check box completion checked by karan

what i want is that when the rhk check box is checked then the karan checkbox is invisble.
this works but you have to go out of the form and back for it to register.
it is I think a refresh issue but I cannot quite do it.

practice-completionDatabase.mdb
0
topUKlawyer
Asked:
topUKlawyer
  • 4
  • 3
  • 3
2 Solutions
 
Bill RossCommented:
Hi,

In the form add the code to the checkbox on the RHK tab

...afterupdate
  docmd.runcommand acccmdsaverecord
  me.requery


the goal is to save the record then update the data so the KAREN tab sees the change

Regards,

Bill
0
 
topUKlawyerAuthor Commented:
thanks will try

what is the difference between refresh and requery please??

0
 
Bill RossCommented:
Hi,

Refresh applies the the screen only and updates any pending screen changes.  Requery repulls the data.  Refresh will not work here since the screen changes have not been saved back to the DB.  If you want the latest data to match the screen then it's good practice save the data and requery the form just to be sure.  Multi user issues are handled as well.

Regards,

Bill
0
Easily Design & Build Your Next Website

Squarespace’s all-in-one platform gives you everything you need to express yourself creatively online, whether it is with a domain, website, or online store. Get started with your free trial today, and when ready, take 10% off your first purchase with offer code 'EXPERTS'.

 
FlysterCommented:
Is this what you are looking for?

Flyster
practice-completionDatabase.mdb
0
 
topUKlawyerAuthor Commented:
Flyster, am tempted to give bill denver the points becuase first to reply.
however when i looked at your solution which appears to work, it does not use save record and requery.

can you explain what you did and how it works compared to mine.
0
 
FlysterCommented:
First I made your code two seperate if statements and added it into the on focus event. Then on form load I set focus on the checkbox, which runs the code, and then focus on the first tab. You can split points or give them to Bill. I do this for the fun!
0
 
topUKlawyerAuthor Commented:
Thanks that helps, what exactly does the on focus event do, if i might ask.

0
 
FlysterCommented:
When you click or tab to a control, and that control is "highlighted", that control is said to have focus. Any code in the on focus event will fire once the control is selected.
0
 
Bill RossCommented:
Hi,

Flyster's method is fine and fast for screen updates.  I prefer to update the database but bother methods are fine.

Also, do what you want with the points.

Regards,

Bill
0
 
topUKlawyerAuthor Commented:
thanks guys for your help and solutions and i feel i have learned something from both your involvement.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

  • 4
  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now