G
Guest
I am trying to set up a way to add a value to a field in a table from a text box in a form. I have set up an append query, and have the code to run the append query from a command button. It doesn't give me any error messagges but it doesn't add any data to the table. Here is the code that I have.
Private Sub Command6_Click()
DoCmd.SetWarnings False
DoCmd.OpenQuery "AddAirport"
Me![Text13] = ""
DoCmd.SetWarnings True
End Sub
This should take the value trom "text box 13" and add it to the table by using the append query. Below is the SQL for my append query.
INSERT INTO AirportList ( Airport )
SELECT AirportList.Airport
FROM AirportList
WHERE (((AirportList.Airport)=[Forms]![AddAirport]![Text13]));
I am not sure where I am going wrong with this. Any help would be appreciated.
Thanks
Private Sub Command6_Click()
DoCmd.SetWarnings False
DoCmd.OpenQuery "AddAirport"
Me![Text13] = ""
DoCmd.SetWarnings True
End Sub
This should take the value trom "text box 13" and add it to the table by using the append query. Below is the SQL for my append query.
INSERT INTO AirportList ( Airport )
SELECT AirportList.Airport
FROM AirportList
WHERE (((AirportList.Airport)=[Forms]![AddAirport]![Text13]));
I am not sure where I am going wrong with this. Any help would be appreciated.
Thanks