if the value is already in tableB, when tableA is queried, record will not be shown

icemonster

Registered User.
Local time
Today, 12:11
Joined
Jan 30, 2010
Messages
502
so basically i have a two listbox A and B and that listbox b's records come from tableb, whenever i want to add the records from listbox i use a pop up form that has a listbox with records from tableA. what i want to accomplish is this, if tableAs record is already appended or is already in tableB, next time i pop the form up, it will only show the records not yet present in tbleA.

do you guys get it?

skinny:

tableA (PK, FKtblC, FKtblB)
tableB (PK, field, field)

what i want is when i add a record from tableB to tableA the next time the listbox is available it would only show the record that has not yet been entered to tableA.
 
You can use the find unmatched query wizard to build this query for you.

Select tableB.PK, tableB.field, tableB.field
From tableB Left Join tableA on tableB.PK = tableA.FKtblB
Where tableA.FKtblB Is Null;
 
i did this already, this would work except that when a class is already added sure enough it won't show up anymore on the selection. what i really want is for the selection only to activate when opening that particular listbox it would be limited to the currently opened listbox.
 
what i really want is for the selection only to activate when opening that particular listbox it would be limited to the currently opened listbox.
I don't understand.
 
here's a clearer question :P i think.

i have been scouring all over the internet for this but found no solution so
maybe you can help me. here's my dilemma.

(am using a mysql back end)
i have a table called tblregclass_student (this table is used to store the
registered classes for the student). when i want to enter a record or class
into that table i use a pop up form with a multiselect listbox to append the
selected data. i have no trouble here. my trouble is, when i do so i want
the records from the pop up listbox be filtered with the registered classes
listbox meaning if the class is already in the registered class listbox it
won't appear on the selection. (the offered classes is also stored on a
different table, tbloffered_courses).

can you help me out? or point me on the right direction on how to do this?

p.s
i use vba to fill the rowsource for my listboxes.
 
well i figured this one out. :D hehe.

what i did was

set the first SQL statement with a where clause for the student then joined it with the avialable programs query then voila. i got what i wanted. hehe
 

Users who are viewing this thread

Back
Top Bottom