473,322 Members | 1,614 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,322 software developers and data experts.

DLookup Expression for a Form controlled by a table that has ProjectNo controlled as

I have the following Dlookup string to automatically pull up the Dnumber in a form which is created from EBO Tracking Table. I keep getting a data mismatch error.

DNumber = DLookup("Dnumber", "project list", ProjectNo = & "[Form]![EBO Tracking]![ProjectNo]")

I want to lookup the DNumber (Text) from the Project List Table with the criteria being ProjectNo (text - it is alpha numeric code) when the ProjectNo is entered into the EBO Tracking Form. However, in the EBO Tracking Table ProjectNo is a lookup wizard controlled by values entered into the Project List Table, which makes my ProjectNo field in EBO Tracking a number value.

So to sum up the Dlookup function DNumber = Dlookup ("Dnumber" (text field in Project List Table), "Project List" (Table to data), "ProjectNo =" (text field in Project List Table) & "[Form]![EBO Tracking]![ProjectNo]"(number value))

Thanks for your help.
Mar 1 '16 #1
1 872
jforbes
1,107 Expert 1GB
The Where Clause is quoted differently in the two examples you've provided. Either way, the following is more correct and it includes the Single Quotes that you will also need:
Expand|Select|Wrap|Line Numbers
  1. DNumber = DLookup("Dnumber", "project list", "ProjectNo ='" & [Form]![EBO Tracking]![ProjectNo] & "'")
Mar 1 '16 #2

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

Similar topics

1
by: Old Timer | last post by:
I wish to type in a number in my "Code" field, for instance 1060, I then wish the number 1060 to trigger an event that will fill in the next field (township field) For instance, 1060 brings up and...
1
by: Randy Lucero | last post by:
I have a question for all you experts out there. I have created an Order Entry form that displays a Customer Name from a table called "CustList". That table also contains the usual.. address,...
0
by: Robert Jarrett | last post by:
I have 5 tables (Names shortened to "A" through "E" for ease of this problem) each having the same first two fields: = T5 (key); and = T30 but otherwise different structures. In a many to many...
8
by: gracealic | last post by:
I am new to access can someone tell me how do we send the data entered from an inquiry form to a table. say i have a form which has fields client name client address client phone client...
0
by: abhishekjethwani | last post by:
How to write a query to access tree structure form multi table. I m having five tables from them first table give me a data which act as the parameter for query for the second table and the two...
4
by: mmeldrum | last post by:
Hoping someone can help me out here. I have a form which performs calcualtions in it. The form was build using a table with the exact same fields. I placed the one expression in the actual field...
8
by: toadmaster | last post by:
Help I am stumped; I am trying to get DLookup to use the email value from another table if a user does not exist in the first table. i = DLookup("email", "Member", "windowsname = text114") If i...
2
by: annakalli | last post by:
Hi, i have a report that imports a number with the dlookup function from one table, and i want to use that number in a calculation, is that possible?
1
by: Preeti vashisht | last post by:
Hi, I have created one form which is taking inputs from user and also getting stored in table. But I am facing a challenge : Every time different user fill up the form but it does not get...
1
by: ccoldfire | last post by:
hi to yo all lets say we have this table tbl_city ID ------- city 10 ------- london 20 ------- barcelona 30 ------- paris and a form that consist of two text...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.