I have a form that allows the users to add or delete records from very small tables that are used as reference. One of the tables is a vehicle table (Vhicltbl. Here is the code I am using for the addition of a vehicle to that table. I need to end Make, Model, and VIN.
When the inputbox opens there is only one field, and I can't figure out how to make it so I can enter the 3 fields.
In addition, the inset bombs with a syntax error on the CurrentDb.execute XSQL line.
Code:
XNew = InputBox("Enter new Vehicle", "Add new Vehicle")
XSQL = "INSERT INTO Vehicltbl (Make) VALUES, (Model) Values ('" & XNew & "')"
CurrentDb.Execute XSQL, dbFailOnError
setupvehicleslb.Requery
When the inputbox opens there is only one field, and I can't figure out how to make it so I can enter the 3 fields.
In addition, the inset bombs with a syntax error on the CurrentDb.execute XSQL line.