Hi Guys,
Trying to add a record to an existing table from the form data, which is already linked to another table and of course, failing spectacularly !!!
Below is my simple code and I am getting a syntax error in the HotelName field to start with, probably next ones will also follow
Where am I going wrong?
Trying to add a record to an existing table from the form data, which is already linked to another table and of course, failing spectacularly !!!
Below is my simple code and I am getting a syntax error in the HotelName field to start with, probably next ones will also follow
Where am I going wrong?
Rich (BB code):
Dim strSQL As String
strSQL = "INSERT INTO tblFFEBudgets (HotelName, BudgetYear, Reference, Description, Justification) VALUES (" & _
Me.HotelName & ", '" & _
Me.RFAYear & "', " & _
Me.BudgetRef & ", " & _
Me.Description & ", " & _
Me.Justification & ");"
DoCmd.RunSQL strSQL