Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Testing if checkbox is checked after update on Access Form

Posted on 2014-10-20
1
560 Views
Last Modified: 2014-10-20
I have a frame with two choices (checkboxes).  After I set the focus to the frame, I want to test whehter one or the other checkbox is checked.  After I test the condition, I want to disable the unchecked box and set focus to the next frame or text box.

I am getting an error the expression has no value.  Here is my code:

Private Sub Frame50_AfterUpdate()
    If Me.Check53 = True Then
        Me.Check55.Enabled = False
    Else
        Me.Check53.Enabled = False
    End If
   
    Me.Check_162 = False
    Me.Check167 = False
    Me.Check169 = False
    Me.Check_162.SetFocus
End Sub

What is the proper syntax?

Thank you

Glen
0
Comment
Question by:GPSPOW
1 Comment
 
LVL 84

Accepted Solution

by:
Scott McDaniel (Microsoft Access MVP - EE MVE ) earned 500 total points
ID: 40392584
Are the checkboxes part of your Option Group? If so, and if the user does NOT need to interact with the boxes again, then just disable the Option Group:

Me.Frame50.Enabled = False

BTW: You really should look into proper nameing conventions. Names like "Check53" and such don't mean much, and can be very confusing when you revisit the code. Much better to name them something that is indicative of their meaning. For example, if you have an option group for Customer Type, you might name the checkboxes "ckResidential" and "ckCommercial"
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

I see at least one EE question a week that pertains to using temporary tables in MS Access.  But surprisingly, I was unable to find a single article devoted solely to this topic. I don’t intend to describe all of the uses of temporary tables in t…
As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
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…

839 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