Solved

Unbound check box in microsoft access form

Posted on 2013-12-07
5
2,163 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
Comment Utility
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
Comment Utility
Thanks for the point in the right direction. And fast.
0
 

Author Comment

by:PetGuy
Comment Utility
How do I do a transparent command button. It is totally new to me.
0
 
LVL 57

Expert Comment

by:Jim Dettman (Microsoft MVP/ EE MVE)
Comment Utility
<<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
Comment Utility
thanks
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

In the previous article, Using a Critera Form to Filter Records (http://www.experts-exchange.com/A_6069.html), the form was basically a data container storing user input, which queries and other database objects could read. The form had to remain op…
Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
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…
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …

743 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

15 Experts available now in Live!

Get 1:1 Help Now