473,781 Members | 2,683 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Inserting product classification using Dlookup

25 New Member
i'm having trouble with Dlookup.I'm trying to insert a Dlookup statement in a update query, so that the user need not upate each record manually.

Supplier Catergory
sSupplierName
sCatergory

Transaction
tSupplierName
tAmount
tCatergory

What i need is to match the supplier name from transaction to the supplier name in the supplier catergory to retrieve the catergory in which the supplier falls in.

How should my Dlookup statement be like? Should i have a same name for the supplier name in the different tables?

I have tried
DLookUp("[sCatergory]","[Supplier Catergory]","[tSupplierName]=" & "[sSupplierName]")
Sep 4 '07 #1
2 1609
Jim Doherty
897 Recognized Expert Contributor
i'm having trouble with Dlookup.I'm trying to insert a Dlookup statement in a update query, so that the user need not upate each record manually.

Supplier Catergory
sSupplierName
sCatergory

Transaction
tSupplierName
tAmount
tCatergory

What i need is to match the supplier name from transaction to the supplier name in the supplier catergory to retrieve the catergory in which the supplier falls in.

How should my Dlookup statement be like? Should i have a same name for the supplier name in the different tables?

I have tried
DLookUp("[sCatergory]","[Supplier Catergory]","[tSupplierName]=" & "[sSupplierName]")
If I am reading you right and you are setting this up as a new database (ie you have not inherited an age old database full of data and find yourself having to do something with it) and if your tables are as simple as that, and if each supplier is unique on the one side (sSupplier table) you should really have the supplier referenced by a long integer (autonumber) as the primary key and use a long integer in the transaction table as the foreign key to reference the suppliers transactions.

You should then define a relationship between the two invoke referential integrity and the cascade update delete options available at which point manual updates become unneccesary using Access Autolookup feature.

Using this method you have no need then to have the suppliers name in the transactions table merely the number referencing them together with the any other fields necessary to complete the transaction record.
.
Hope this helps if not then I obviously read you wrong?

Jim
Sep 4 '07 #2
barry07
47 New Member
Try this (I'm assuming sSupplierName is a Text field)

Expand|Select|Wrap|Line Numbers
  1. DLookUp("[sCatergory]","[Supplier Catergory]","[tSupplierName]='" & [sSupplierName] & "'")
Sep 5 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

2
1987
by: AG | last post by:
I have a very big table with 20 million records DistinctProjectionKey which i join several times to different tables in this query. select distinct distinctprojectionkeyid,dpk.MarketID, dpk.Classificationid, dpk.DistributorID, dpk.ManufacturerID, dpk.LocationID, dpk.TimeID,P4.FACTOR as factor1,P3.FACTOR as factor2 ,P2.FACTOR as factor3,P1.FACTOR as factor4
3
1490
by: Paul T. Rong | last post by:
Hi there! There is a unbound text box and a list box (product_name) in the form, users input a product number, the listbox shows the right product name.Is it possible? How to do it? Thank you for any ideas and suggestion. Paul from Bratislava, Slovakia
0
1239
by: Niketa Mahana | last post by:
Hi, We are in the process of making product in windows forms that is localized presently for all european countries.We are supposed to support all eastern and western european date , time and number formats.However we are currently facing a problem that say a user in Italy uses our product and user's settings have a "." as a time seperator sql server is unable to insert such time values into the database.We get an error for date-time...
4
1163
by: savvy | last post by:
I'm developing a Garment Shopping Cart. On the Admin side, while inserting the each Product details, the user has to choose options of Colour Icons and Sizes for each Garment. All the colour icons are displayed in a Datalist which checkboxes and the Sizes( 3 mnths, 6 mnths, 12 mnths, 18 mnths, 24 mnths) are displayed using Checkboxlist. The user has enter Stocklevels for each colour and size selected for a particular product. For example...
27
2056
by: jacob navia | last post by:
As Richard Bos rightly pointed out, I had left in my classification of types the C99 types Complex and boolean. Here is a new classification. Those are not mentioned in the classification of Plauger and Brody, probably because their work predates C99. Since there are no examples of this in the literature (known to me) please take a look. Thanks
6
1644
by: Grant Robertson | last post by:
I am interested in including classification info in metadata. I am aware of the Dublin Core and XMP. However, neither of these appear to specify exactly how the classification data should be formatted within the element. I am interested in any standardized formats for expressing Dewey Decimal System - DDS, Library of Congress Classification - LCC, Cutter Expansive Classification, Universal Decimal Classification - UDC, Colon Notation...
5
3985
by: howser99 | last post by:
Hi All Ive got an issue with inserting images into a command button from a table that I have embedded a OLE object into. The following is the code Im am trying to use; If bolMenuVisible Then Me("Option" & rst!).Visible = True ' Me("Option" & rst!).Picture = rst! ' icon ' Me("Option" & rst!).PictureData = cmd1.PictureData ' icon Me("Option" &...
4
1942
by: Evan Klitzke | last post by:
Hi all, What frameworks are there available for doing pattern classification? I'm generally interested in the problem of mapping some sort of input to one or more categories. For example, I want to be able to solve problems like taking text and applying one or more tags to it like "romance", "horror", "poetry", etc. This isn't really my research specialty, but my understanding is that Bayesian classifiers are generally used for problems...
3
1563
by: lapkorts | last post by:
Hi, I am looking for product catalogue/shop, preferable for Joomla or known CMS with the following two features: 1. Multidimentional. I.e. each product could belong to several trees/ branches same time. For instance I want to find particular product via brand and classification accepted inside particular brand. It is the first dimension. Also I want to find the same product inside applications tree - it is the second dimension. Other...
0
9474
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10143
jinu1996
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...
1
10076
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
7486
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6729
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();...
0
5375
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...
1
4040
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
2
3633
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2870
bsmnconsultancy
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...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.