Dlookup / Vlookup

leibale

Active Member
Joined
Sep 12, 2002
Messages
337
Is there a way to use in VBA inside access, some function like Dlookup but to do the search in array within the code
Or something like Vlookup of excel (with the TRUE or the FALSE argument) ?
 

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney
You may need to be more specific. In short, "Yes"...but what are you trying to do?
 
Upvote 0
You may be able to do what you need with a query, which will be much faster than any functions. But if you really need something like VLOOKUP, check you the ELOOKUP function on Allen Browne's site.

Denis
 
Upvote 0
Re: Dlookup / Vlookup access, VBA

In excel we use the VLOOKUP function with the argument FALSE which is similar to the dlookup function in Access
Some time we need to use that function with the TRUE argument that search the highest value in the table that is Less or Eq to the value I want.
When a user in Login, I am search the current hour against a table:
04----Good Night
11----Good Morning
17----Good Afternoon
24---Good Evening
etc,
and sent the user a greeting

So, my questions are:
1. There is a way to use the dlookup against an array and not against a record set (with the true or the false argument)
2. What is the way to do it in access with the TRUE argument
 
Upvote 0
Re: Dlookup / Vlookup access, VBA

As I said before you need a different function. Check out ELOOKUP for range matching (ie the TRUE argument).
For the FALSE argument just join the main table to the lookup table in a query.

Denis
 
Upvote 0

Forum statistics

Threads
1,223,231
Messages
6,170,884
Members
452,364
Latest member
springate

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top