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 » New Users
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Can DLookup be used to compare to a control value.



 
 
Thread Tools Display Modes
  #1  
Old February 4th, 2010, 12:59 PM posted to microsoft.public.access.gettingstarted
GA[_3_]
external usenet poster
 
Posts: 17
Default Can DLookup be used to compare to a control value.

I've thought myself into a corner and am probably missing something
blindingly obvious so I'd appreciate being pointed in the right
direction.

I have an Access database that has linked tables to 2 SQL servers.
The main back end, I have full control of but the second one provides
read only access to the full contact details of about 500 contacts.

My main form is based on a set of publications that are for sale. I
have a set of sub-forms on a tab control one of which is the record of
sales for each publication.

Out of the contacts, there are about 20 non-subscribers and as I
cannot write to the contacts datanase, I have created a separate table
with just an ID and Name field using a combobox based on the read only
table.

When a new sale record is completed, the customer field is a combo
based on the read only contacts table, but it can also accept entries
which are not in the the list. I've put a large red label on the sales
sub-form to warn when a customer is a non-subscriber and to do this I
need to determine one of three possibilities -

1. The customer exists in the read only contacts table and is not in
the non-subscribers table.
2. Diitto but is in the non-subscribers table
3. It's a customer who isn't in the contacts table.

In the second and third cases I want to display the label (which is
set not visible by default) and in the first I want to keep it hidden.

I started by trying to use DLookup to compare to "Me.Customer" in the
"after update" of the customer control but just got completely
befuddled.

Can anybody help please or point me to a working example of this sort
of problem.

Thanks in advance,
GA

 




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 04:07 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.