I have a form that has sub-form on it. On the sub-form, there is a field (price) which value is automatically filled from a combo box (product) and from a table (products). All this happens on the form. How can I pass the value (price) to the a table named "invoices"?
Asked
Active
Viewed 37 times
1 Answers
0
I believe it should be as simple as this.
Dim strSQL as string
strSQL = "INSERT INTO YourTable ([Account Number], [Dollar Amount]) VALUES (" & Me.cboAccount & ", " & nz( me.txtDollars,0) & ")"
Currentdb.execute strsql, dbfailonerror
Modify to suit your needs.
Here is another, more embellished, solution.
MS Access: Insert a selected entry from Combo Box into table

ASH
- 20,759
- 19
- 87
- 200