By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,775 Members | 2,658 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,775 IT Pros & Developers. It's quick & easy.

adding data in a loop qry

P: 23
Hopeful New Year:
for explanatory purposes- I am running a looped sql from two tables. One is clients and other is provider. The sql loops through the provider info entering client data. At the end of each provider my info is put in before the next loop with a different provider begins. So

With rst
If Not rst.BOF And Not rst.EOF Then
End If
Do Until rst.EOF
dim imp as string
*** what do I put here??? if rst!provider <> then
imp = rst!client & my name and info
imp = rst!client
end if

strcolumn3 = "select rst!provider & imp

sSQL = "INSERT INTO table3 ( column1) " _
& "VALUES('" & strColumn3 & "')"

db.Execute sSQL

cnt = cnt + 1
It should look like this:
client 1
my name and info
client 3
client 4
my name and info
provider 3
client 5
Jan 2 '08 #1
Share this Question
Share on Google+
1 Reply

P: 23
thanks anyway I got it
Jan 3 '08 #2

Post your reply

Sign in to post your reply or Sign up for a free account.