Go Back   Access World Forums > Microsoft Access Discussion > Modules & VBA

 
Reply
 
Thread Tools Rate Thread Display Modes
Old 06-18-2019, 08:55 AM   #1
murray83
sega collector
 
Join Date: Mar 2017
Location: Daventry, UK
Posts: 421
Thanks: 94
Thanked 1 Time in 1 Post
murray83 is on a distinguished road
dlookup with multiplie criteria one of which is a yes/no

Hi merry internet people

i think i may have asked this before but my memory is shocking and cant find what i used it for if i did ask so here i am again

this is my dlookup code

Code:
=DLookUp("[BeenHereText]","[tbl_BeenHere]","[Location]='Stone_Cottage_Basement' AND [BeenHere] = '1''")
what i want the text box to display is Been Here which is stored in the table hence why have 2 criteria one for location and another if true

i have tried True as well as a 1 as shown in the above code but each time i just get the ol #Error

all and any help much appreciated

cheers

murray83 is offline   Reply With Quote
Old 06-18-2019, 09:05 AM   #2
theDBguy
Iím here to help
 
theDBguy's Avatar
 
Join Date: Oct 2018
Location: SunnySandyEggo
Posts: 3,088
Thanks: 36
Thanked 735 Times in 718 Posts
theDBguy will become famous soon enough theDBguy will become famous soon enough
Re: dlookup with multiplie criteria one of which is a yes/no

Hi. Have you tried it this way?
Code:
=DLookUp("[BeenHereText]","[tbl_BeenHere]","[Location]='Stone_Cottage_Basement' AND [BeenHere] = True")
__________________
Just my 2 cents...

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
theDBguy is offline   Reply With Quote
Old 06-18-2019, 09:08 AM   #3
murray83
sega collector
 
Join Date: Mar 2017
Location: Daventry, UK
Posts: 421
Thanks: 94
Thanked 1 Time in 1 Post
murray83 is on a distinguished road
Re: dlookup with multiplie criteria one of which is a yes/no

Quote:
Originally Posted by theDBguy View Post
Hi. Have you tried it this way?
Code:
=DLookUp("[BeenHereText]","[tbl_BeenHere]","[Location]='Stone_Cottage_Basement' AND [BeenHere] = True")
i hadnt but have now and

You Guys

are the best

it only bloody works

cheers

murray83 is offline   Reply With Quote
Old 06-18-2019, 09:24 AM   #4
theDBguy
Iím here to help
 
theDBguy's Avatar
 
Join Date: Oct 2018
Location: SunnySandyEggo
Posts: 3,088
Thanks: 36
Thanked 735 Times in 718 Posts
theDBguy will become famous soon enough theDBguy will become famous soon enough
Re: dlookup with multiplie criteria one of which is a yes/no

Quote:
Originally Posted by murray83 View Post
i hadnt but have now and

You Guys

are the best

it only bloody works

cheers
Hi. Congratulations! Glad to hear you got it to work. We're happy to assist. Good luck with your project.

__________________
Just my 2 cents...

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
theDBguy is offline   Reply With Quote
Reply

Tags
dlookup , multiple criteria , textbox , yes/no

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
DLookUp as criteria within DLookup chuckcoleman Modules & VBA 15 04-10-2019 11:39 AM
[SOLVED] Dlookup two criteria ikzouhetnietweten Modules & VBA 3 11-23-2015 10:57 AM
dlookup - no criteria deekras Modules & VBA 3 10-27-2003 07:33 AM
DLookup with 2 criteria. hooi General 5 10-22-2003 01:01 AM




All times are GMT -8. The time now is 06:57 PM.


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

Featured Forum post


Sponsored Links


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