PhilipEwen
Registered User.
- Local time
- Today, 17:46
- Joined
- Jun 11, 2001
- Messages
- 81
Hi,
sorry if this is really basic to you all, but i am stuck and have searched and searched but to no avail. ( it would probably help if i knew exactly what to search for ! )
What i am doing is adding data to a table when a button is pushed ( code bound to button )
i have 2 unbound text boxes - when i hit the button i want the data from those boxes to be put in table.
I can do it for 1 text box
ss = "INSERT INTO [resorts](resortname) VALUES (txt_resort_name)"
DoCmd.RunSQL ss
But how do i do it for both ? If i run this once for the resortname, then run the statement again with the txt_transfer_cost data, it just adds a new entry to the table, so that the name and cost are not on the same entry.
There must be a way of joining the statements together so that it will insert the data to both fields...
ss = "INSERT INTO [resorts](resortname) VALUES (txt_resort_name)"
ss = ss & "INSERT INTO [resorts](transfercost) VALUES (txt_trans_cost)"
DoCmd.RunSQL ss
This is what i did but keep coming up with errors of missing semicolons etc etc
PLEASE PLEASE HELP !
Thanks
Phil.
sorry if this is really basic to you all, but i am stuck and have searched and searched but to no avail. ( it would probably help if i knew exactly what to search for ! )
What i am doing is adding data to a table when a button is pushed ( code bound to button )
i have 2 unbound text boxes - when i hit the button i want the data from those boxes to be put in table.
I can do it for 1 text box
ss = "INSERT INTO [resorts](resortname) VALUES (txt_resort_name)"
DoCmd.RunSQL ss
But how do i do it for both ? If i run this once for the resortname, then run the statement again with the txt_transfer_cost data, it just adds a new entry to the table, so that the name and cost are not on the same entry.
There must be a way of joining the statements together so that it will insert the data to both fields...
ss = "INSERT INTO [resorts](resortname) VALUES (txt_resort_name)"
ss = ss & "INSERT INTO [resorts](transfercost) VALUES (txt_trans_cost)"
DoCmd.RunSQL ss
This is what i did but keep coming up with errors of missing semicolons etc etc
PLEASE PLEASE HELP !
Thanks
Phil.