combobox

referee

Registered User.
Local time
Today, 17:42
Joined
Aug 21, 2003
Messages
38
hi all

on a form i have 25 comboboxes with names
the form is based on a table (tblpersons) with the key personID
now how can i in all the comboboxes in the event before update
doing the following:
when i select a name in a combobox before update i want to search in all the combobowes of that name i selected not 2x selected is
and if not then the name must in the field otherwise it would tell me that thr name al is selected in another combobox
if the name i selected is ok then this name must not again availible in the combobox
can someone help me with that code please?
is this with a loop ???


thanks
 
What is the reason why do you have 25 names in 25 combobox ?
 
I would seriously question the use of 25 combo boxes all with names. That does not sound right at all

What is it you are trying to do ?

If you post a description of what you are trying to do then people will probably be able to help. Simply asking for code leaves people in the dark becuase they do not really understand waht the end result is supposed to represent

Len
 
hi,

now in all the boxes are all the 25 names for 25 jobstations
i put one name on a station
i a sort of planner
that's i wanne to do
can someone help me

thanks
 
Think that you need to rethink this one.

Basically the way I would set this up (I think)
Table 1 contains People PK is People ID
Table 2 contains Stations PK is Station ID
Table 3 contains People/Stations PK is People ID and Station ID. Also set unique index on People ID and separate unique index on Station ID

This all means that
People ID and Station ID combination cannot be duplicated
People ID can only exist Once
Station ID can only exist Once

You then have a Add form with 2 combo boxes
People and Station
I would also have a list box showing records that you have already created

You could use queries to update the combo lists so that existing records People or Stations are not shown in the combo box.

This will involve some fancy footwork with UNIOn and Finding Non Duplicate queries along with refreshing the combo boxes after each selection

If these combinations are going to change with any degree of freequency then there are some additional work to do because this set up would need you to remove the existing record and then create a new record
because
People ID cannot be duplicated and
Station ID cannot be duplicated.

I would strongly suggest that you carefully evaluate what you want to do

If these combinations are not likely to change very often then this is a lot of work for little use.

If they are going to change daily then it is quite an administrative overhead.

Len B
 

Users who are viewing this thread

Back
Top Bottom