On a form, I have a subform which contains line items. Their is a checkbox for the user to select the line items that need to be saved. How do I loop through those line items to determine if it has the checkbox selected? Thank you in advance
On a form, I have a subform which contains line items. Their is a checkbox for the user to select the line items that need to be saved. How do I loop through those line items to determine if it has the checkbox selected? Thank you in advance
Use a .MoveNext Loop on the RecordsetClone until .EOF.
OK. I'll work through your suggestion.
My using the checkbox has a problem, when I click on the first checkbox, it places a check within each box. Did I do something wrong or should I use another method for selecting the line items?
You may have a problem here. In order for a CheckBox to be unique on each record it would need to be bound to a field in the Recordset of the form. It is why I was thinking about ListBoxes early in this thread but we were concentrating on getting the Link fields working first.
Here's a demo of what I had in mind for the SubForm. I'm afraid I don't remember where I got this or who to credit with the code but it is not mine.
Those look nice and very functional. I don't know if they'll work for me. In addition to selecting the record, their are two additional fields of info that the user will enter.
OK, then how about one ListBox and one SubForm in continuous form view?
my recordsource for my subform is a query containing fields from two ODBC linked tables. Does that provide me any options?
Since you cannot modify them it poses a problem. The CheckBox idea needs an updateable recordset. The ListBox idea does not.
OK. I'm unclear on what you mean. Can you get me started? I've attached a zipped file with the tables and forms I've created
I'm thinking outside the box. Ultimately, for each record within ICPOLineItems, their will be a record within tblProductPrintRunRecord. What if when the main form is opened, it appends to tblProductPrintRunRecord any new records within ICPOLineItems. Then I could use tblProductPrintRunRecord as the recordsouce for the subform. I realize this is not best for data normalization, but I'm limited right now.
When you are stuck with RecordSources that cannot be altered, sometimes you have to put the rule book aside and just make it work. Give it a try. I have to go do a task for an hour or so right now. I'll check back in when I return.
Thanks. I appreciate all your help. I wouldn't be where I am without you. I'll let you know what I figure out.
Thinking outside of the box worked greated. Thanks again for all your assistance!!
That's great! Thanks for posting back with your success.