473,385 Members | 1,356 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

dlookup key violation error 3075

tblproduct (simplified)
productid(pk)
productcode
productcost
productprice
warrantycode

any warranty claim is invoiced out as the original productcode but
with a w in front e.g. original code 3005015TPR becomes W3005015TPR
(both of which are in [productcode]) the warrantycode field is only
used where the productcode starts with a W then three digits and is
exactly the same as the productcode

this gives two records, the original product with [productcode] as
3005015TPR and [warrantycode] as null, and the warranty product with
[productcode] as W3005015TPR and [warrantycode] as 3005015TPR.

when the warranty product is invoiced I want to use dlookup to find
the cost of the original product so something like

dlookup([productcost],"tblproduct", productcode = warrantycode)

i.e. lookup the cost of the original product.

keep getting errors.

really want to use this in an update query which will select all the
products begining W### and update the productcost of the warranty
product with the productcost of the original product

thanks in advance
Jan 21 '08 #1
1 2293
On Jan 21, 1:03*pm, BobbyDazzler <david.a.mitch...@inbox.comwrote:
tblproduct (simplified)
productid(pk)
productcode
productcost
productprice
warrantycode

any warranty claim is invoiced out as the original productcode but
with a w in front e.g. original code 3005015TPR becomes W3005015TPR
(both of which are in [productcode]) *the warrantycode field is only
used where the productcode starts with a W then three digits and is
exactly the same as the productcode

this gives two records, the original product with [productcode] as
3005015TPR and [warrantycode] as null, and the warranty product with
[productcode] as W3005015TPR and [warrantycode] as 3005015TPR.

when the warranty product is invoiced I want to use dlookup to find
the cost of the original product so something like

dlookup([productcost],"tblproduct", productcode = warrantycode)

i.e. lookup the cost of the original product.

keep getting errors.

really want to use this in an update query which will select all the
products begining W### and update the productcost of the warranty
product with the productcost of the original product

thanks in advance
If your warrantycode field is "text" then you have to enclose your
dlookup in quot marks;
dlookup([productcost],"tblproduct","productcode='" & warrantycode &
"'")

hope that helps
bobh.
Jan 21 '08 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: JMCN | last post by:
I have an ftp program that i inherited and i tried to modify it to ftp over my file however, i receive an error message : run-time error '3075 syntax error (missing operator) in query expression...
2
by: jwa6 | last post by:
syntax for a dlookup ok I give up! here is the error... ' Run-time error 3075 Syntax error in query expression '...' this is the code before that a contractor wrote. (I dont know if it ever...
4
by: ugo_lavoie | last post by:
hi this is my code (sorry most of it is in french) Dim strFiltre As String, strCherché As String, Résultat As Variant Dim strnumerovendeur As String 'Obtenir le nom d'un client...
2
by: ctyrrell | last post by:
I have read with interest the many discussions of the 3048 Error: Cannot open any more databases. I understand how the number of open Table ID's causes the problem. My question has to do with the...
2
by: Don | last post by:
Can someone help me fix my DLookup problem. I'm far from proficiency with Access. I've been creating databases for several years for work with the help of many of you and trial and error. I have...
2
by: jr | last post by:
Hello everyone! I am new to this sort of postings so I'm not even sure if this is the correct place to start. Anyway, I would realy appreciate any help. I have a some VBA code that works quite...
3
by: adigga1 | last post by:
Hello Experts, I'm about to go grey with this dlookup statement: I'm trying to run a dlookup statement, I have the correct expression string, etc. but when I run it under the Immediate window...
15
by: jaad | last post by:
I am apologizing in advance if I am not posting this question correctly. I have had a read at the posting guide and will try to see if I can do it right this time. I have an AfterUpdate event...
15
by: rleepac | last post by:
This is a little complicated but I'll do my best to explain. In my db I have a table called L_AgeCorrection which has the following fields: Age, Sex, Frequency, AgeValue This is a table used to...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.