New to forms and VB
Access2000
I have a form with a listbox containing 4 columns and 5 different suppliers from SupplierTable(SELECT SupplierTable.VendorID, SupplierTable.Supplier, SupplierTable.Vendor, SupplierTable.PO FROM SupplierTable;
............................................................
Form Button:
Private Sub Button_New_Request_Click()
On Error GoTo Err_cmdqryAppendSupplierRequest
Dim stDocName As String
stDocName = "qryAppendSupplierRequest"
DoCmd.SetWarnings False
DoCmd.OpenQuery stDocName, acViewNormal, acEdit
DoCmd.SetWarnings True
Exit_cmdqryAppendSupplierRequest:
Exit Sub
Err_cmdqryAppendSupplierRequest:
MsgBox Err.Description
Resume Exit_cmdqryAppendSupplierRequest
End Sub
............................................................
I want to select a supplier and INSERT into NewRequestTable
with a append query:
(INSERT INTO NewRequesttable ( SUPPLIER, VENDOR, PO )
SELECT SupplierTable.Supplier AS Expr1, SupplierTable.Vendor AS Expr2, SupplierTable.PO AS Expr3
FROM SupplierTable
............................................................
How do I insert the selection from the listbox to the NewRequestTable table? I want to eventually be able to enter a quantity(i.e. 5) for the supplier and update the NewRequestTable with 5 entries.
Currently NewRequestTable is inserted with the entire listbox
These forums are a great source of knowledge and ideas
Thank you for your help!!
Access2000
I have a form with a listbox containing 4 columns and 5 different suppliers from SupplierTable(SELECT SupplierTable.VendorID, SupplierTable.Supplier, SupplierTable.Vendor, SupplierTable.PO FROM SupplierTable;
............................................................
Form Button:
Private Sub Button_New_Request_Click()
On Error GoTo Err_cmdqryAppendSupplierRequest
Dim stDocName As String
stDocName = "qryAppendSupplierRequest"
DoCmd.SetWarnings False
DoCmd.OpenQuery stDocName, acViewNormal, acEdit
DoCmd.SetWarnings True
Exit_cmdqryAppendSupplierRequest:
Exit Sub
Err_cmdqryAppendSupplierRequest:
MsgBox Err.Description
Resume Exit_cmdqryAppendSupplierRequest
End Sub
............................................................
I want to select a supplier and INSERT into NewRequestTable
with a append query:
(INSERT INTO NewRequesttable ( SUPPLIER, VENDOR, PO )
SELECT SupplierTable.Supplier AS Expr1, SupplierTable.Vendor AS Expr2, SupplierTable.PO AS Expr3
FROM SupplierTable
............................................................
How do I insert the selection from the listbox to the NewRequestTable table? I want to eventually be able to enter a quantity(i.e. 5) for the supplier and update the NewRequestTable with 5 entries.
Currently NewRequestTable is inserted with the entire listbox
These forums are a great source of knowledge and ideas
Thank you for your help!!