Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to loop around a control in a contiuous form

Status
Not open for further replies.

mozgheib

Programmer
Dec 14, 2003
50
KW
Hello,

I have a radio button in a contiuous form. It is used to accept or refuse a record which is represented in a form.

Now I want to provide the user with a button that when clicked it will seleteced mutliple records. Obviously I need to loop around my radio button control and based on a criteria select a bunch of records.

How can I do that???

Thanks
 
'a button that when clicked it will seleteced mutliple records'
.....and do what?

Run a query which selects all records which have the field bound to the (option button) frame set to the Accept value.
 
The records need to be selected as a first step and as a second step if the user decides to accept the values, these selected fields will update the database and turn a false value to true.

 
Well you could create an update query based on the selections. You'll have to change my table/field names for your own - see below.

Update mymaintable set myvalue = true where
myid in (select myid from myformrecordsource where myflag = true)

mymaintable is your table that contains the false values you want to change to true. myid is the primary key field for that table.

I don't know how you are displaying the records for the user to select from but somehow you have to get the main table primary key field into the query for this form so that it can be matched with the main table.
myformrecordsource is the query for your displayed form. myflag is the option group name for the option group containing your Accept and Reject options.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top