I am looking for help on trying to add data into a table / query through text boxes and a button. Currently, there are two buttons that will be hooked up to the text boxes; Search & Add.
Search I have finished already, where it searches a query attached to a table for the input you entered into the text boxes. Simple.
Though now I'd also like to make an add button, where once you put information into the text boxes and click add instead of search, it directly adds that information onto the table and saves it so you can view it at later points in time.
This is code I found online somewhere, but I don't know how to make it pick up the data from the text boxes using it:
Private Sub Command344_Click()
INSERT INTO OrderT (CustomerName,OrderName,OrderDesc,DateOfPurchase,ProjectDueDate,EngineerDueDate,ProjectComplete,CutplanDueDate,MaterialSpecs,CutplanCode,HardwareSpecs,HardwareDueDate,HardwareComplete,PurchaseOrder,PurchaseSupplier);
VALUES (CustomerName,OrderName,OrderDesc,DateOfPurchase,ProjectDueDate,EngineerDueDate,ProjectComplete,CutplanDueDate,MaterialSpecs,CutplanCode,HardwareSpecs,HardwareDueDate,HardwareComplete,PurchaseOrder,PurchaseSupplier);
End Sub
Button Name: Command344
TextBox Names: CustomerName OrderName OrderDesc DateOfPurchase ProjectDueDate EngineerDueDate ProjectComplete CutplanDueDate MaterialSpecs CutplanCode HardwareSpecs HardwareDueDate HardwareComplete PurchaseOrder PurchaseSupplier
The fields in the table have the same names in the exact same order from top -> bottom, left -> right.
The table name is OrderT.
Form name is SearchF