Go Back   Access World Forums > Microsoft Access Discussion > Reports

 
Reply
 
Thread Tools Rate Thread Display Modes
Old 10-12-2017, 12:59 PM   #1
bmhuettinger
Newly Registered User
 
Join Date: Jul 2017
Posts: 30
Thanks: 1
Thanked 0 Times in 0 Posts
bmhuettinger is on a distinguished road
DLookUp isssue

I use DLookUP all the time - that's why it's particularly frustrating that I can't get this one to work.

It appears as a control in a Textbox on my form "DailyReviewForm". I want the textbox to be populated with the data from the field "MFGPart" which appears in the table "tbl_StockProgramParts". I want the lookup to be based on the (current) Form field "CustomerPO" which corresponds with the table field "POPart#"

=DLookUp([MfgPart],"tbl_StockProgramParts","[popart#]"=[Forms]![DailyReviewForm]![CustomerPO])

I've tried this many ways, many times. The field names are all spelled correctly. I don't know what else to do, though I feel it's something very silly that I'm doing wrong

bmhuettinger is offline   Reply With Quote
Old 10-12-2017, 01:09 PM   #2
pbaldy
Wino Moderator
 
pbaldy's Avatar
 
Join Date: Aug 2003
Location: Nevada, USA
Posts: 30,850
Thanks: 8
Thanked 3,643 Times in 3,586 Posts
pbaldy is a splendid one to behold pbaldy is a splendid one to behold pbaldy is a splendid one to behold pbaldy is a splendid one to behold pbaldy is a splendid one to behold pbaldy is a splendid one to behold pbaldy is a splendid one to behold
Re: DLookUp isssue

The field name has to be in quotes. The = in the criteria has to be within the quotes. Your syntax is correct for a numeric data type, will need delimiters for text.
__________________
Paul
Microsoft Access MVP

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
pbaldy is offline   Reply With Quote
The Following User Says Thank You to pbaldy For This Useful Post:
bmhuettinger (10-12-2017)
Old 10-12-2017, 01:27 PM   #3
bmhuettinger
Newly Registered User
 
Join Date: Jul 2017
Posts: 30
Thanks: 1
Thanked 0 Times in 0 Posts
bmhuettinger is on a distinguished road
Re: DLookUp isssue

Thanks! I'll try this out in the AM!

bmhuettinger is offline   Reply With Quote
Old 10-12-2017, 02:05 PM   #4
Mark_
Longboard on the internet
 
Join Date: Sep 2017
Posts: 399
Thanks: 6
Thanked 66 Times in 65 Posts
Mark_ is on a distinguished road
Re: DLookUp isssue

Just to make sure, since the rest of your fields seem to be better named, should "popart#" be POPartNo or PO_PartNo?

By preference I avoid non-alpha numerics in names, something you look to be doing also.

Mark_ is offline   Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Nest dlookup inside a dlookup Djblois Modules & VBA 2 06-29-2011 12:06 PM
DLookup within DLookup not working brunopg7 Queries 3 04-22-2011 07:08 AM
DLookup using another Dlookup result stu999 Queries 4 11-09-2010 07:02 AM
DLookup Help rhounsome Modules & VBA 3 03-24-2005 07:37 AM
Dlookup (then) Dlookup Next Record, How? musicmaker Forms 1 01-18-2001 09:16 AM




All times are GMT -8. The time now is 02:04 AM.


Microsoft Access Help
General
Tables
Queries
Forms
Reports
Macros
Modules & VBA
Theory & Practice
Access FAQs
Code Repository
Sample Databases
Video Tutorials

Sponsored Links

How to advertise

Media Kit


Powered by vBulletin®
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
(c) copyright 2017 Access World