DLookUp is driving me crazy.

G

Guest

I have a form [f_Request_List], which contains a box [UrgencyID_Box] that is
a numerical value, just on it's own it display a result number just fine. The
lookup table [t_Urgency] contains two fields, [t_Urgency] (text) and
[UrgencyID] (numeric), there's only 3 records.

The following Yields #Error
=DLookUp("[Urgency]","[t_Urgency]","[UrgencyID]='" & [UrgencyID_Box] & "'")
=DLookUp("[t_Urgency]![Urgency]","[t_Urgency]","[UrgencyID]='" &
[UrgencyID_Box] & "'")

The following causes the text span across the fields when the form is
displayed and locking the .ldb. file forcing a reboot to clear the memory.
The same thing happens when I use the various incarnations of 'Me!'.
=DLookUp("[Urgency]","[t_Urgency]","[UrgencyID]='" &
[Forms]![f_Request_List]![UrgencyID_Box] & "'")

I've read about not putting spaces in, however Access is doing this on its
own.
 
K

Ken Snell [MVP]

If UrgencyID is a numeric field in the table t_Urgency:


=DLookUp("Urgency","t_Urgency","[UrgencyID]=" & [UrgencyID_Box])
 
G

Guest

Ken~

Most helpful, I was using the format for text, not numbers. Also I had to
hide the UrgencyID box, and use a 2nd box to display the result.

Live and Learn
THANKS!
~Lori

Ken Snell said:
If UrgencyID is a numeric field in the table t_Urgency:


=DLookUp("Urgency","t_Urgency","[UrgencyID]=" & [UrgencyID_Box])


--

Ken Snell
<MS ACCESS MVP>




Lori said:
I have a form [f_Request_List], which contains a box [UrgencyID_Box] that
is
a numerical value, just on it's own it display a result number just fine.
The
lookup table [t_Urgency] contains two fields, [t_Urgency] (text) and
[UrgencyID] (numeric), there's only 3 records.

The following Yields #Error
=DLookUp("[Urgency]","[t_Urgency]","[UrgencyID]='" & [UrgencyID_Box] &
"'")
=DLookUp("[t_Urgency]![Urgency]","[t_Urgency]","[UrgencyID]='" &
[UrgencyID_Box] & "'")

The following causes the text span across the fields when the form is
displayed and locking the .ldb. file forcing a reboot to clear the memory.
The same thing happens when I use the various incarnations of 'Me!'.
=DLookUp("[Urgency]","[t_Urgency]","[UrgencyID]='" &
[Forms]![f_Request_List]![UrgencyID_Box] & "'")

I've read about not putting spaces in, however Access is doing this on its
own.
 

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

DLOOKUP Issue 10
DLookUp 1
Trying to use DLookup 3
Using Max or DMax in DLookUp criteria? 1
DLookUp Question 13
dlookup problem 2
DLookup using multiple Fields 4
dlookup using multiple fields 2

Top