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

Dlookup function gives "You canceled the previous operation" errmsg

P: n/a
Hello all,
I already put the same question, only now I have more to tell ...
Although I used this code before in the same routine (only the fieldname of
the table differs) ___ at this point in the code I get the error "You
canceled the previous operation" err msg. When clicking on Help I get a
white screen. I haven't got the slightest idea what it means ....
I pinned down that this error comes from the Dlookup function, because if I
put some other text to replace the Dlookup function it works .... here is
the code ... Can anybody help please ?

sBody = sBody & sAanhefNE & vbCrLf & vbCrLf & DLookup("[ISFOLLOWUP1NL]",
"tblMailTeksten") & _
vbCrLf & vbCrLf & "Met vriendelijke groet," & vbCrLf & vbCrLf & _
"MyName" & vbCrLf & "MyFunction" & _
vbCrLf & "mailto:my****@myprovider.be" & vbCrLf & vbCrLf & vbCrLf
Nov 12 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
DLookup() does generate this message if you misspell or misform one of its
arguments. Is there a space or spurious or missing character or misspelling
in one of the names?

To find the problem, open the Immediate Window (Ctrl+G).
Enter:
? DLookup("[ISFOLLOWUP1NL]", "tblMailTeksten")
Once you get that working, you will have found the problem with your line.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Ronny Sigo" <ro********@skyynet.be> wrote in message
news:40*********************@news.skynet.be...
Hello all,
I already put the same question, only now I have more to tell ...
Although I used this code before in the same routine (only the fieldname of the table differs) ___ at this point in the code I get the error "You
canceled the previous operation" err msg. When clicking on Help I get a
white screen. I haven't got the slightest idea what it means ....
I pinned down that this error comes from the Dlookup function, because if I put some other text to replace the Dlookup function it works .... here is
the code ... Can anybody help please ?

sBody = sBody & sAanhefNE & vbCrLf & vbCrLf & DLookup("[ISFOLLOWUP1NL]",
"tblMailTeksten") & _
vbCrLf & vbCrLf & "Met vriendelijke groet," & vbCrLf & vbCrLf & _
"MyName" & vbCrLf & "MyFunction" & _
vbCrLf & "mailto:my****@myprovider.be" & vbCrLf & vbCrLf & vbCrLf

Nov 12 '05 #2

P: n/a
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Perhaps:

You don't have a "WHERE" clause in the DLookup() function. Is there
only one record in the table "tblMailTeksten"? If there isn't you
have to have a WHERE clause. E.g.:

DLookup("ISFOLLOWUP1NL", "tblMailTeksten", "ID=25")
MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)

-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv

iQA/AwUBQDF9mYechKqOuFEgEQLJtACg1pkzsqCxyhUrJGRVlTY6cX qY3hAAoMEL
WQ1wXZxJzp3s2Jeih7ALtGfg
=kNOt
-----END PGP SIGNATURE-----
Ronny Sigo wrote:
Hello all,
I already put the same question, only now I have more to tell ...
Although I used this code before in the same routine (only the fieldname of
the table differs) ___ at this point in the code I get the error "You
canceled the previous operation" err msg. When clicking on Help I get a
white screen. I haven't got the slightest idea what it means ....
I pinned down that this error comes from the Dlookup function, because if I
put some other text to replace the Dlookup function it works .... here is
the code ... Can anybody help please ?

sBody = sBody & sAanhefNE & vbCrLf & vbCrLf & DLookup("[ISFOLLOWUP1NL]",
"tblMailTeksten") & _
vbCrLf & vbCrLf & "Met vriendelijke groet," & vbCrLf & vbCrLf & _
"MyName" & vbCrLf & "MyFunction" & _
vbCrLf & "mailto:my****@myprovider.be" & vbCrLf & vbCrLf & vbCrLf


Nov 12 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.