query based form ....... check box to select items

avacess

Registered User.
Local time
Today, 00:04
Joined
Apr 28, 2011
Messages
16
query based form .......

i have a multiple item form based on a query. in this form, some tasks are listed. i need to be able to select several tasks and to add them into a table. these tasks are picked up, at the user decision, using a check box, located on the same row with each individual task listed.

how do i do that? any idea? i am struggling for days with this issue. :mad:

as always, your input is much appreciated.
george
 
Are the tasks listed in a table? If they are listed in a table, does the table contain a field that represents the check box?
 
The way I did this was to fabricate an ADO recordset, and included a bit (yes/no) column. Then when the user has checked whatever records he wants, have a command button to make a pass through the fabricated recordset and call an insert routine for each checked row.
 
Are the tasks listed in a table? If they are listed in a table, does the table contain a field that represents the check box?

Uncle, thanks for your time
Yes they are listed in a table. In the same table i have a field yes/no for the checkbox. Pleare remember that the form is based on a query. I need calculated fields from the query to be shown on the form.
Any idea? George.
 
The way I did this was to fabricate an ADO recordset, and included a bit (yes/no) column. Then when the user has checked whatever records he wants, have a command button to make a pass through the fabricated recordset and call an insert routine for each checked row.

Bparkinson. I will try this idea, although i am not sure where to start. My vba knowledge is converging to zero. ;)
George
 
Uncle Gizmo's way is the easiest. The checkboxes on the form are bound back to the field in the table so they reflect the user's choice (even if it is a via query).

The calculated fields will appear on the form too. However if calculations include aggregates (Sum, Max, Min etc), you won't be able to change the the records so you won't be able to tick the box. Avoid this and you should be OK.

The next step is to run a query to Insert new records based on the checkbox. The checkbox must be set back to False (using another query) before the next selections are made.

However since the checkbox is only a temporary flag, storing it in the table is considered a bit low brow from a professional developer's perspective. Consequently, more experienced developers use the technique described by bparkinson.

However, if you have no experience in coding, fabricating an ADO recordset for a form and running a loop through it is probably not really the best place to begin.

Though one does have to being somewhere.
 

Users who are viewing this thread

Back
Top Bottom