I've been dragged out of retirement to do a 5 minute job. Unfortunately after 6 years I've forgotten more than I knew. So bear with me if I use the wrong names for things but....
I have a form that is bound to some query. It has sub forms bound to different queries. The form displays list of items and the quantity of those items that have been sold. There is a print button that prints a report which is basically the contents of the form. The user wants to add in an invoice number to the report. The invoice number is sequential starting from 1. The last invoice number is held on a stand alone table. I want to access that table. Use the value in the report and then update it by adding 1 to the field.
I've tried docmd.runsql which I've discovered is a no no. My latest attempts have been using record sets. Is this the right route. I'm getting nowhere fast at the moment.
I have a form that is bound to some query. It has sub forms bound to different queries. The form displays list of items and the quantity of those items that have been sold. There is a print button that prints a report which is basically the contents of the form. The user wants to add in an invoice number to the report. The invoice number is sequential starting from 1. The last invoice number is held on a stand alone table. I want to access that table. Use the value in the report and then update it by adding 1 to the field.
I've tried docmd.runsql which I've discovered is a no no. My latest attempts have been using record sets. Is this the right route. I'm getting nowhere fast at the moment.