|
Toby -
I am having a little trouble with your code.
While Not results.EOF
db.Execute("INSERT INTO
tblContactDetails VALUES(" & results!IngClientID &
", <<txtContactType here>>")
results.MoveNext
Wend
In particular
the part where I give the value of txtContactType. I need to feed the
string "2005EL" so I have tried:
db.Execute
("INSERT INTO tblContactDetails VALUES(" & results!lngClientID &",
"2005EL") which gives me a syntax error. When I change it to "2005EL"
") I also receive a syntax error.
db.Execute ("INSERT INTO tblContactDetails VALUES("
& results!lngClientID & ", 2005EL ") gives me a missing operator
error.
I would really like to be able to run this in code
since I believe that this will provide me the best flexibility for updating
information for future seminars.
Thanks in advance for your
help. This message was
posted to a newsgroup. Please post replies and questions to the group so
that others can learn as well.
From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Toby Bierly Sent: Friday, September 30, 2005 4:40 PM To: [email protected] Subject: Re: [AccessDevelopers] Appending Records ' Update Contact Details
Dim db As DAO.Database
Dim results As DAO.Recordset
Set db = CurrentDb
Set results = db.OpenRecordset("your query from
your email here")
While Not results.EOF
db.Execute("INSERT INTO
tblContactDetails VALUES(" & results!IngClientID &
", <<txtContactType here>>")
results.MoveNext
Wend
***Query to find reverse of query in your
email***
SELECT tblClientInfo.lngClientID
FROM [ExportToMasterClient - 2005 EL Seminar], tblClientInfo WHERE ([ExportToMasterClient - 2005 EL Seminar].[Last
Name] <> tblClientInfo.txtLastName)
OR ([ExportToMasterClient - 2005 EL Seminar].[First
Name] = tblClientInfo.txtFirstName)
OR ...
The above query will find all records where there is any
field that DOESN'T match.
HTH,
Toby
Please zip all files prior to uploading to Files section.
SPONSORED LINKS
YAHOO! GROUPS LINKS
|
- RE: [AccessDevelopers] Appending Records Jones, Glenn P MSG (Ret) FL-ARNG
- RE: [AccessDevelopers] Appending Rec... Hoffman, Tobi K \(DYS\)
- RE: [AccessDevelopers] Appending Rec... Jones, Glenn P MSG (Ret) FL-ARNG
- Re: [AccessDevelopers] Appending... Toby Bierly
- RE: [AccessDevelopers] Appending Rec... Eric Douglas
- RE: [AccessDevelopers] Appending Rec... Jones, Glenn P MSG (Ret) FL-ARNG
- RE: [AccessDevelopers] Appending Rec... Crosier, Dawn
- Re: [AccessDevelopers] Appending... Toby Bierly
- RE: [AccessDevelopers] Appending Rec... Richard Rogers Beasimer
- RE: [AccessDevelopers] Appending Rec... Crosier, Dawn
- RE: [AccessDevelopers] Appending Rec... Crosier, Dawn
