G
Guest
I have an Orders form with OrderDetail in a subform - the data source for the
subform is a Select Query of Orders and OrderDetail tables.
I have a "Print Invoice" button on the Orders form which opens an Excel
template. I can successfully populate the header info (customer/Order No etc)
of the template, and can even populate the first line of the invoice detail
(product, description, unit cost) with the data from the first record of the
sub form - in fact I can populate as many Invoice Detail lines as there are
records in the subform - but each invoice detail line is only the data from
the first subform record.
What I cannot figure out - despite much reading here and elsewhere - is how
to programatically (VB code) access each subform record in turn. Any help
appreciated!
subform is a Select Query of Orders and OrderDetail tables.
I have a "Print Invoice" button on the Orders form which opens an Excel
template. I can successfully populate the header info (customer/Order No etc)
of the template, and can even populate the first line of the invoice detail
(product, description, unit cost) with the data from the first record of the
sub form - in fact I can populate as many Invoice Detail lines as there are
records in the subform - but each invoice detail line is only the data from
the first subform record.
What I cannot figure out - despite much reading here and elsewhere - is how
to programatically (VB code) access each subform record in turn. Any help
appreciated!