loop qry
Hopeful New Year: Any help is much appreciated.
MS Access - 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
rst.MoveFirst
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
else
imp = rst!client
end if
strcolumn3 = "select rst!provider & imp
sSQL = "INSERT INTO table3 ( column1) " _
& "VALUES('" & strColumn3 & "')"
db.Execute sSQL
rst.MoveNext
cnt = cnt + 1
Loop
It should look like this:
provider1
client 1
client2
my name and info
provider2
client 3
client 4
etc
my name and info
provider 3
client 5
etc