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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Updating records in a repeat region

Status
Not open for further replies.

farnorth

Technical User
Aug 14, 2002
32
US
Hi all,

I have been hunting the solution for a few days now without success. I have built a report using the repeat region behavior. Each record has a true/false field called printed. When the report is run it pulls all records with the printed field value of False. What I need to do is put a button that the user would click that would change all records in the report printed from False to True. Is it possible to do this and would it require a form area around the repeat region. I keep running into errors with forms and repeate regions.

Thanks
Bob
 
Just add all of the id's of each record to a string and then use that in your update.
Code:
UPDATE tblName SET printed = true WHERE idField IN(strIDs)

[Peace][Pipe]
 
Just to show you how much I don't know about strings, What is concidered the ID of a record and doesn't it change with the addition of new records?
 
The ID of a record is whatever you have set as the unique id so yes it does change with the addition of new records. So you will either have to wrap a form around each record with an update behaviour attached to the submit button or do some handcoding to do them all in one go.

Cheech

[Peace][Pipe]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top