Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium


How do I create a SELECT field

Posted on 2014-08-31
Medium Priority
Last Modified: 2014-09-04
I want to create a form that gives users the ability to select the records they want to process. If I add a SELECT field to the table and two users do the same process at the same time they will mess one another up. Do I need to take the list of records, put them into a temporary table and add the SELECT field, or is there an easier/better/alternative way?
Question by:Rob4077
LVL 52

Accepted Solution

Gustav Brock earned 668 total points
ID: 40295379
This is nearly identical to this question where the alternatives are discussed:


LVL 46

Assisted Solution

aikimark earned 668 total points
ID: 40296518
The simplest solution would be a selection/selected table.

In the OnCurrent() event, you would do a check of the selection/selected table to see if it includes a row for the current user and current record (ID field).  Reflect the selected status on the form.  You can probably do this with one or two additional controls on the form.  A command button will allow the user to toggle the selected status and a label will show the selected status.  You might be able to use different button colors and texts with a single control change to your form.

The simplest check would be a DLookup() function.
LVL 31

Assisted Solution

hnasr earned 664 total points
ID: 40300334
Do I need to take the list of records, put them into a temporary table and add the SELECT field
I support that and approach it this way:
Assume table name a(aid Primary key, f1, f2)
Code to create a_temp table.
DoCmd.RunSQL "SELECT a.* INTO a_temp FROM a ;"
Add column sel yesno
DoCmd.RunSQL "ALTER TABLE a_temp ADD COLUMN sel yesno"
Make the form record source  a INNER JOIN a_temp ON a.aid=a_temp.aid
SELECT a.aid, a.f1, a.f2, a_temp.sel
FROM a INNER JOIN a_temp ON a.aid = a_temp.aid
ORDER BY a.f1, a.f2;
Each user can run his own a_temp table and hence the selections made.
Technology Partners: 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!


Author Comment

ID: 40300744
Thanks for the suggestions. I've been unable to return to this project for the last few days but will try the suggestions on Friday before I close out the question.

Author Comment

ID: 40305187
Thanks very much. Sorry for the delay. All the options provided seem to be easy enough to work with so I will share the points. Thanks.
LVL 31

Expert Comment

ID: 40305213

Featured Post

Receive 1:1 tech help

Solve your biggest tech problems alongside global tech experts with 1:1 help.

Question has a verified solution.

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

Explore the ways to Unlock VBA Project Password Excel 2010 & 2013 documents. Go through the article and perform the steps carefully to remove VBA Excel .xls file.
In a use case, a user needs to close an opened report by simply pressing the Escape (Esc) key. This can be done by adding macro code in Report_KeyPress or Report_KeyDown event.
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

578 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