Solved

Unbound check box in microsoft access form

Posted on 2013-12-07
5
2,219 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
  • 3
  • 2
5 Comments
 
LVL 57

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 57
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

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

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

This article is a continuation or rather an extension from Cascading Combos (http://www.experts-exchange.com/A_5949.html) and builds on examples developed in detail there. It should be understandable alone, but I recommend reading the previous artic…
Most if not all databases provide tools to filter data; even simple mail-merge programs might offer basic filtering capabilities. This is so important that, although Access has many built-in features to help the user in this task, developers often n…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
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 …

816 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