Loop through filtered table - ideas please

frispee

Registered User.
Local time
Today, 01:29
Joined
May 23, 2012
Messages
28
Hi,

This is what I am trying to do:
1. I have a form with a sub-form which is a query output in datasheet view.
2. Adjacent to this sub-form is another sub-form which is another table with information about the corresponding line items in the previous sub-form.
3. I need to use the information in both these sub-forms to do some calculations and update another table.

Since the first sub-form is a filtered list, I cannot use a counter directly to loop through the records.

Any suggestions/instructions would be very helpful as I have just started out using Access/VBA. I have attached a screenshot of the sub-forms to make the situation clear. Thank you in advance :)
 

Attachments

  • sub-form arrangement.JPG
    sub-form arrangement.JPG
    86.9 KB · Views: 122
Since the first sub-form is a filtered list, I cannot use a counter directly to loop through the records.

Change and create a temp table, use a DAO.QueryDef to run the query and place the records into said new temp table. Bind the subform to that temp table. Then you will be able to loop through the records.
 

Users who are viewing this thread

Back
Top Bottom