A
Anne
This is a repost from August 29
I have a continuous form that lists all of the order
details for a particular order. I've added a button that
lets the user invoice this order. What I want to do is
have the code behind the button add a record to the
invoice header table (1 record) as well as add a record
for each of the order details displayed on the form to the
invoice details table (many records - 1 for each order
detail).
The code I have written so far adds the invoice header
correctly but I can't get any more than one record in the
invoice details table.
VB Help says I can use a For Each or nest With statements
but I 'Think' I am having trouble at the syntax level.
For Each Me!Fieldname or Me.Fieldname in Form is
unacceptable.
Nested With statements may be the better way to go but
again, if I reference either a field within the form or
the form itself I get only 1 record added to the invoice
details table.
Any and all suggestions welcome
Anne
I have a continuous form that lists all of the order
details for a particular order. I've added a button that
lets the user invoice this order. What I want to do is
have the code behind the button add a record to the
invoice header table (1 record) as well as add a record
for each of the order details displayed on the form to the
invoice details table (many records - 1 for each order
detail).
The code I have written so far adds the invoice header
correctly but I can't get any more than one record in the
invoice details table.
VB Help says I can use a For Each or nest With statements
but I 'Think' I am having trouble at the syntax level.
For Each Me!Fieldname or Me.Fieldname in Form is
unacceptable.
Nested With statements may be the better way to go but
again, if I reference either a field within the form or
the form itself I get only 1 record added to the invoice
details table.
Any and all suggestions welcome
Anne