So I'm trying to populate a table based on selections I make within a form.
The form is based of a query that pulls a new product category that needs to be added to my first reference table for products.
The form shows all the new unique product codes, and there is a drop down box with product categories whose source is also the first reference table, so a new code would be:
'JBL - TRX - FVB - TRZ' And based on that new info, I would select from the drop down to select the corresponding category and click 'Add Record' button.
I'm building the event for the button and the code is as follows so far :
Private Sub Add_Record_Click()
End Sub
Private Sub cmbAdd_Record_Click()
'add data to table
CurrentDb.Execute "INSERT INTO tblPVMTable(PVMJoinField, SummaryPVMCategory) " & _
" VALUES(" & Me.PVM_JOIN_FIELD & ", '" & _
Me.cboSummaryPVMCategory & "' , "
'refresh data in list on form
frmPVMTablesub.Form.Requery
End Sub
Private Sub Combo2_Click()
End Sub
Private Sub Toggle4_Click()
End Sub
I keep getting errors with the main portion of code.:banghead:
Name of table fields :
PVMJoinField
SummaryPVMCategory
Name of Query Fields Populating the Form:
PVM_JOIN_FIELD
cboSummaryPVMCategory
Thanks to All in ADVANCE!
The form is based of a query that pulls a new product category that needs to be added to my first reference table for products.
The form shows all the new unique product codes, and there is a drop down box with product categories whose source is also the first reference table, so a new code would be:
'JBL - TRX - FVB - TRZ' And based on that new info, I would select from the drop down to select the corresponding category and click 'Add Record' button.
I'm building the event for the button and the code is as follows so far :
Private Sub Add_Record_Click()
End Sub
Private Sub cmbAdd_Record_Click()
'add data to table
CurrentDb.Execute "INSERT INTO tblPVMTable(PVMJoinField, SummaryPVMCategory) " & _
" VALUES(" & Me.PVM_JOIN_FIELD & ", '" & _
Me.cboSummaryPVMCategory & "' , "
'refresh data in list on form
frmPVMTablesub.Form.Requery
End Sub
Private Sub Combo2_Click()
End Sub
Private Sub Toggle4_Click()
End Sub
I keep getting errors with the main portion of code.:banghead:
Name of table fields :
PVMJoinField
SummaryPVMCategory
Name of Query Fields Populating the Form:
PVM_JOIN_FIELD
cboSummaryPVMCategory
Thanks to All in ADVANCE!