A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Database Design
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

IIF to check values in more than one table



 
 
Thread Tools Display Modes
  #1  
Old July 19th, 2007, 01:06 PM posted to microsoft.public.access.tablesdbdesign
KarenF
external usenet poster
 
Posts: 72
Default IIF to check values in more than one table

Hi,

I want to put a control onto a form that will tell me if a record has a
matching record in another table. I know I can use a query, the unmatched
query wizard (to see which records don't), and the find duplicates query
wizard (will tell me which records are duplicated in a table on a given
field), however, I would like the control to simply give me a yes or no
answer when comparing the ID of the current record to the Record IDs in a
matching table.

Any ideas?

Many thanks,

Karen
  #2  
Old July 19th, 2007, 02:24 PM posted to microsoft.public.access.tablesdbdesign
Allen Browne
external usenet poster
 
Posts: 11,706
Default IIF to check values in more than one table

Use DLookup() to see if the value exists in the other table.

Basics of how to use this:
Getting a value from a table: DLookup()
at:
http://allenbrowne.com/casu-07.html

--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"KarenF" wrote in message
...

I want to put a control onto a form that will tell me if a record has a
matching record in another table. I know I can use a query, the unmatched
query wizard (to see which records don't), and the find duplicates query
wizard (will tell me which records are duplicated in a table on a given
field), however, I would like the control to simply give me a yes or no
answer when comparing the ID of the current record to the Record IDs in a
matching table.


 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 03:32 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.