PhilipEwen
Registered User.
- Local time
- Today, 22:22
- Joined
- Jun 11, 2001
- Messages
- 81
Hi,
I am running an SQL statement in VBA so that when a button is pressed, it takes the values from 2 text fields and puts them in a table in the correct fields.
I can do this fine with 1 statement
ss = "INSERT INTO [resorts](resortname) VALUES (txt_resort_name)"
but this only inserts into the 1 field (resortname)
I am trying to add data to 2 fields at the same time, so how do i join the SQL statements together?
ss = "INSERT INTO [resorts](resortname) VALUES (txt_resort_name);"
ss = ss & "INSERT INTO [resorts](transfercost) VALUES (txt_trans_cost)"
Doesn't work - how do i do it ??
Thanks in advance for any help
Phil.
I am running an SQL statement in VBA so that when a button is pressed, it takes the values from 2 text fields and puts them in a table in the correct fields.
I can do this fine with 1 statement
ss = "INSERT INTO [resorts](resortname) VALUES (txt_resort_name)"
but this only inserts into the 1 field (resortname)
I am trying to add data to 2 fields at the same time, so how do i join the SQL statements together?
ss = "INSERT INTO [resorts](resortname) VALUES (txt_resort_name);"
ss = ss & "INSERT INTO [resorts](transfercost) VALUES (txt_trans_cost)"
Doesn't work - how do i do it ??
Thanks in advance for any help
Phil.