This topic is locked

Dropdown list

9/23/2018 5:20:08 AM
ASPRunner.NET General questions
K
kleanthis author

I have two two tables. The fields in table one are (Id, Class, No)
ID..Class..No

1....A....1

2....A....2

3....A....0

4....B....1

5....B....2

6....B....0
On table two
ID...Name...Class...No

45....Marios.....A....2

46....Nick.........A....1

47....Marion.....B....1

48....Andrea....A....2

49....Goerge....B....1

50....Dino........B....2
I need to have dependent Dropdown list with the Namesof the second table. The dropdown list basing on the values in the first table (Class and No). No problem until now. I use the Visual Editor - Lookup wizard.
THE PROBLEM

When i have in No = 0 I need to show the names of No 1 & 2.
example
Class A

No 1

It must show Names - Nick
Class A

No 2

It must show Names - Marios, Andrea
Class A

No 0

It must show Names - Nick, Marios, Andrea (that is my problem) Pls help.

A
Arkie 9/24/2018

I suggest your database is not complete. In the first table you defined a record:

3....A....0

but you do not show any names(records) which meet the criteria for

A....0
You should have additional records in table two such as:

51....Nick......A....0

52....Marios....A....0

53....Andrea....A....0
When new records are added, look for ones that are in both of the first two groups and then add a record showing it in the 3rd group.