Hello ,
Can anyone help me in understanding how do we use Vlookup ( as we use in Excel) in MS access.
Thanks much in advance
4 1775
VLookup, as you said, is an Excel function, not an Access function! Perhaps if you explained what it is you're trying to do we could help you.
Welcome to TheScripts!
Linq ;0)>
VLookup, as you said, is an Excel function, not an Access function! Perhaps if you explained what it is you're trying to do we could help you.
Welcome to TheScripts!
Linq ;0)>
Ok i'll explain with an illustration. I ve 2 tables . 1st one is Suplier Details which has 2 fields viz Supllier name and Supplier address.
The 2nd table deals with the purchases and has the following fields; Order No, Description of goods, Supplier and Supplier Address .
Now what i want is every time i mention a supplier in the 2nd table , it should lookup for the address in the 1st table against the supplier . This would preculde the trouble of typing the address everytime a particular supplier is selected .
I hope this explain what i am looking out for.
Regards ,
Shreyans.
Ok i'll explain with an illustration. I ve 2 tables . 1st one is Suplier Details which has 2 fields viz Supllier name and Supplier address.
The 2nd table deals with the purchases and has the following fields; Order No, Description of goods, Supplier and Supplier Address .
Now what i want is every time i mention a supplier in the 2nd table , it should lookup for the address in the 1st table against the supplier . This would preculde the trouble of typing the address everytime a particular supplier is selected .
I hope this explain what i am looking out for.
Regards ,
Shreyans.
Try:
DLookup("[Supplier Address]","Supplier Table", "[Supplier] = '" & Me!Supplier & "'")
Replace the object names with the actual names from your application. Also, the above assumes you are doing the lookup by supplier name (text). If you have a supplier number, you should use that, but keep in mind that syntax changes for a numeric field as shown below:
DLookup("[Supplier Address]","Supplier Table", "[SupplierID] = " & Me!SupplierID)
Try:
DLookup("[Supplier Address]","Supplier Table", "[Supplier] = '" & Me!Supplier & "'")
Replace the object names with the actual names from your application. Also, the above assumes you are doing the lookup by supplier name (text). If you have a supplier number, you should use that, but keep in mind that syntax changes for a numeric field as shown below:
DLookup("[Supplier Address]","Supplier Table", "[SupplierID] = " & Me!SupplierID)
Hi ,
Thanks for the help. HOwever i had to make a few changes in the code suggested by you, since it gave an error.
I then used - =DLookUp("[Last Name]","Persons","[First Name] = Form![First Name]")
. It works well now.
Thanks a lot anyways.
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Koen |
last post by:
Hi all,
My application uses a lot of lookup tables.
I've splitted the frontend (forms, reports, etc) from the backend (data).
The database has around 10 different users.
The values in the lookup tables are not likely to change.
Question 1: Should I include them in the backend (with rest of data) or the
frontend?
|
by: my-wings |
last post by:
I've been reading about how evil Lookup fields in tables are, but I've got
to be missing something really basic. I know this subject has been covered
before, because I've just spent an hour or two reading about it on google,
but there is something I still don't understand, and I'm hoping someone will
be willing to explain it to me in small words.
Let's say I have a table for addresses, and it includes a field for state.
What I would...
|
by: Zachary Turner |
last post by:
I want to make a Lookup Field based on another Lookup field. In other
words, I have this table A with two fields: ID and Name, where ID is
an Autonumber and Name is a friendly name. Then I have a table B
which links to A via a Lookup Field so that I can select the friendly
name from combo box. Now, I want to have a table C which links to
table B via a lookup field, and only displays the items which are
selected in some combo box of some...
|
by: google |
last post by:
I have a database with four table. In one of the tables, I use about
five lookup fields to get populate their dropdown list. I have read
that lookup fields are really bad and may cause problems that are hard
to find. The main problem I am having right now is that I have a report
that is sorted by one of these lookup fields and it only displays the
record's ID number. When I add the source table to the query it makes
several records...
|
by: silvastein |
last post by:
It would be great if someone can help me with this. It seems like it
should either be easy (so far, not!) or maybe it isn't possible. Here
goes:
Table B has TextField1 that looks up values from a single field in
Table A. When I create a form for filling in Table B, TextField1
appears as a long list of options from Table A. If I were to make the
field really tall, it would show multiple rows of data from Table A.
I would prefer...
| |
by: Kevin |
last post by:
I was reading on the mvps.org site not to use the lookup wizard in the
table design, but rather use a query. I'm confused by this, given that
the lookup wizard basically creates a query and uses it as the data
source - you can see it in the "Lookup" tab in the table design window.
So, what gives? :)
|
by: Paul H |
last post by:
Suppose I have a table called tblPeople and I want a field to illustrate
whether each person prefers cats or dogs. I could do it one of three ways.
1. A plain text field
Create a text field in tblPeople called PreferredPet.
2. A lookup field that stores text values.
Create a text field in tblPeople called PreferredPetID and use it to lookup
an identical text field in tblPreferredPets.
|
by: Sune |
last post by:
Hi all,
I'm not a C# programmer so please be gentle:
Prereq:
---------------
- The lookup service (see below) implemented by a C module cannot be
re-written in C# ;-)
- The lookup service is to be loaded into the process of the C#
application, i.e. I want to avoid expensive IPC
|
by: =?Utf-8?B?RU1hbm5pbmc=?= |
last post by:
(I originally posted this to the data access newsgroup but received no replies)
I've got an Access 2003 mdb that I'm converting to VB.Net. I'm having
trouble with getting the main data source to update after updates to a lookup
table.
There are 2 tables with a one-to-many relationship in the mdb. VB.Net
recognizes this relationship according to it's dataset designer diagram.
Currently I have 2 forms: a main form for data-entry and a...
|
by: Mark |
last post by:
I have a table with a field that uses a combobox to populate values. The
Lookup tab within table design mode is the following:
Display Control Combo Box
Row Source Type Table/Query
Row Source SELECT .LastName, .FirstName, .EmployeeNumber FROM ;
Bound Column 3
Column Count 3
Column Heads Yes
Column Widths 1";1";1"
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |