Discussion:
Having a look up field that doesn't suggest a data that is already un the column the lookup if for
(too old to reply)
Hueyduck
2017-09-05 14:07:34 UTC
Permalink
Hi everyone,

Big newbie to databases here.

Say I have a table with a list of customers and info about theme.

I have another table wich lists the customers I invited to an event
(date when I invited them, how I did it ans so on).

In the field "invited", I creat a lookup thingy that creates link to
the "customers" table.

That workd fine.

Now, I can chose the name of each invited person in the list that comes
from my table "customers".

But how do I prevent the look up list to display a name that I have
already entered in the column ?

Preventin doublons in the column is fine since it keeps me from
cantacting twice the same person, but how do I make the look up list
only display the customers that are not already in my list of guests ?

It's simple SQL syntax, but I know nothing about it...

Heres what the SQL for the look up looks for now:
================================
SELECT Spectateurs.[Spectateur No], Spectateurs.[Prénom / Nom]
FROM Spectateurs
ORDER BY Spectateurs.[Prénom / Nom];
=====================================

Thanks for your help....

Huey
Jürgen Meyer
2017-10-09 17:52:42 UTC
Permalink
Post by Hueyduck
Hi everyone,
Big newbie to databases here.
Say I have a table with a list of customers and info about theme.
I have another table wich lists the customers I invited to an event
(date when I invited them, how I did it ans so on).
In the field "invited", I creat a lookup thingy that creates link to
the "customers" table.
That workd fine.
Now, I can chose the name of each invited person in the list that comes
from my table "customers".
But how do I prevent the look up list to display a name that I have
already entered in the column ?
Preventin doublons in the column is fine since it keeps me from
cantacting twice the same person, but how do I make the look up list
only display the customers that are not already in my list of guests ?
It's simple SQL syntax, but I know nothing about it...
================================
SELECT Spectateurs.[Spectateur No], Spectateurs.[Prénom / Nom]
FROM Spectateurs
ORDER BY Spectateurs.[Prénom / Nom];
=====================================
Thanks for your help....
Huey
SELECT Spectateurs.[Prénom / Nom]
FROM Spectateurs
WHERE (((Spectateurs.Invited)=False))
ORDER BY Spectateurs.[Prénom / Nom];

rgrds
Juergen
Hueyduck
2017-10-20 09:24:38 UTC
Permalink
Post by Jürgen Meyer
Post by Hueyduck
Hi everyone,
(...)
Post by Jürgen Meyer
Post by Hueyduck
Preventin doublons in the column is fine since it keeps me from
cantacting twice the same person, but how do I make the look up list
only display the customers that are not already in my list of guests ?
It's simple SQL syntax, but I know nothing about it...
================================
SELECT Spectateurs.[Spectateur No], Spectateurs.[Prénom / Nom]
FROM Spectateurs
ORDER BY Spectateurs.[Prénom / Nom];
=====================================
Thanks for your help....
Huey
SELECT Spectateurs.[Prénom / Nom]
FROM Spectateurs
WHERE (((Spectateurs.Invited)=False))
ORDER BY Spectateurs.[Prénom / Nom];
rgrds
Juergen
Hi Juergen,
I'll try it as soon as I can. It reads like the simple trick I was
looking for.
Thanks for your time and answer.

Huey

Loading...