DLOOKUP ISSUE

  • Thread starter Thread starter Patrick Stubbin
  • Start date Start date
P

Patrick Stubbin

I USE DLOOKUP ELSEWHERE IN THE DATABASE AND NO PROBLEM

Dim occ As String

occ = DLookup("Description", "Gal", "ID=" & Me.Name)
I USE THIS ON AN AFTER UPDATE POINT

WHY DOES THIS GIVE AN ERROR THAT SAYS THE ERROR IS THAT THE OBJECT OR CLASS
DOES NOT SUPPORT THE SET OF EVENTS OR TEHRE IS SOME SORT OF OTHER ERROR...
BOTH ID AND ME.NAME ARE LONG INTEGERS
 
Patrick Stubbin said:
I USE DLOOKUP ELSEWHERE IN THE DATABASE AND NO PROBLEM

Dim occ As String

occ = DLookup("Description", "Gal", "ID=" & Me.Name)
I USE THIS ON AN AFTER UPDATE POINT

WHY DOES THIS GIVE AN ERROR THAT SAYS THE ERROR IS THAT THE OBJECT OR
CLASS
DOES NOT SUPPORT THE SET OF EVENTS OR TEHRE IS SOME SORT OF OTHER
ERROR...
BOTH ID AND ME.NAME ARE LONG INTEGERS


Please don't post in all caps. It makes your messages hard to read and
often comes across as shouting.

It's unlikely that Me.Name is a long integer, as Me.Name (referred to in
code behind a form) will always return the name of the form, because Name is
a property of the form. If you have a field and/or control in on your form
named "Name" -- a very bad name for a field, as it can so easily lead to
problems like this -- then you must use:

Me!Name

instead of

Me.Name

That may not be the only problem with your form, but its certainly *a*
problem with the line of code you posted.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Enter Date on Emailing 6
Adding a CC to email code! 7
Emailing Question from my DB 2
Sending Report via Email 3
True or False for SNP or PDF format to email 12
DLookup error 1
Dlookup error 4
Add to text box String 4

Back
Top