Solved

access make one checkbox invisible if another is checked

Posted on 2011-03-09
10
458 Views
Last Modified: 2012-05-11
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
Comment
Question by:topUKlawyer
  • 4
  • 3
  • 3
10 Comments
 
LVL 14

Accepted Solution

by:
Bill Ross earned 380 total points
ID: 35085254
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
 

Author Comment

by:topUKlawyer
ID: 35085327
thanks will try

what is the difference between refresh and requery please??

0
 
LVL 14

Expert Comment

by:Bill Ross
ID: 35085436
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
 
LVL 22

Expert Comment

by:Flyster
ID: 35085541
Is this what you are looking for?

Flyster
practice-completionDatabase.mdb
0
 

Author Comment

by:topUKlawyer
ID: 35095834
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
Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

 
LVL 22

Assisted Solution

by:Flyster
Flyster earned 120 total points
ID: 35098614
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
 

Author Comment

by:topUKlawyer
ID: 35099104
Thanks that helps, what exactly does the on focus event do, if i might ask.

0
 
LVL 22

Expert Comment

by:Flyster
ID: 35099209
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
 
LVL 14

Expert Comment

by:Bill Ross
ID: 35099566
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
 

Author Closing Comment

by:topUKlawyer
ID: 35099718
thanks guys for your help and solutions and i feel i have learned something from both your involvement.
0

Featured Post

Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

QuickBooks® has a great invoice interface that we were happy with for a while but that changed in 2001 through no fault of Intuit®. Our industry's unit names are dictated by RUS: the Rural Utilities Services division of USDA. Contracts contain un…
Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

932 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now