Solved

Unbound check box in microsoft access form

Posted on 2013-12-07
5
2,347 Views
Last Modified: 2013-12-08
I have multi-record access form that has an unbound check box. When I select any of the check boxes they are all marked as selected. I need to somehow identify a certain record so that I can use other field values of the record to create a query tied to a button on the form. Can the unbound check box be used to identify a specific record or is there a better way to identify a record for use as a parameter in a query?
0
Comment
Question by:PetGuy
[X]
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
  • 3
  • 2
5 Comments
 
LVL 58

Accepted Solution

by:
Jim Dettman (Microsoft MVP/ EE MVE) earned 500 total points
ID: 39703676
This is a common problem.   Your best bet is to add a "Selection table", which has a field for the primary key of your record..

Add this table to the query for your form, join on the primary key, and then double click on the line and make it an outer join.

You can then define a column in the query as:

Not IsNull(<selection key field>)

Then use a transparent command button over the check box to toggle the state of the checkbox by adding/deleting records in the selection table.

  The other method if you only need to select a single record is use the Primary Key field as part of a WHERE clause for a form or report.

Jim.
0
 

Author Comment

by:PetGuy
ID: 39703690
Thanks for the point in the right direction. And fast.
0
 

Author Comment

by:PetGuy
ID: 39703715
How do I do a transparent command button. It is totally new to me.
0
 
LVL 58
ID: 39704227
<<How do I do a transparent command button. It is totally new to me. >>

 Set the Transparent property to Yes.  Then place the control and do a "Bring to Front" on the arrange menu.

This places it "on top" of the check box and it will receive the click rather then the check box.   Besides the normal top/bottom, left/right positioning, there is also a Z order to controls (3rd axis).   The "send to back" and "bring to front" are the two commands that work with this and control what is seen when controls are stacked on top of one another.

Make sure it's big enough that it covers the checkbox.  Also, you should set the enabled property to false and the locked property to true on the checkbox.

Jim.
0
 

Author Comment

by:PetGuy
ID: 39704582
thanks
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Preparing an email is something we should all take special care with – especially when the email is for somebody you may not know very well. The pressures of everyday working life stacked with a hectic office environment can make this a real challen…
AutoNumbers should increment automatically, without duplicates.  But sometimes something goes wrong, and the next AutoNumber value is a duplicate.  This article shows how to recover from this problem.
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …

636 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