Hi,
I'm not sure if this has been answered before... I've looked back quite far and I can't see an answer. I'm sure my problem will be very simple for someone to solve...
I have two drop down boxes to select items from a table; the data looks a little like this,
R1 R2 Sys Sub
1 0 A a
1 1 A b
1 2 A c
1 3 A d
1 4 A e
2 0 B f
2 1 B g
2 2 B h
2 3 B i
3 0 C j
I have the first drop down box selecting all unique values of R1, so a list of A,B,C,D,E,F,G.... ( SELECT DISTINCT Sheet1.R1, Sheet1.System FROM Sheet1 ORDER BY R1; )
The second drop down box uniquely selects R2, so lists a,b,c,d,e,f,g... ( SELECT DISTINCT Sheet1.R2, Sheet1.R1, Sheet1.Subsystem FROM Sheet1 ORDER BY R1 ASC, R2 ASC; ) when you select from the first drop down box, the second box becomes focused on whichever sub corresponds to R1=selected and R2=0.
The thing is I want to LIMIT the second drop down list to only the R2 at a given R1.
does that make sense? basically I want to filter the list in the second box. Is there some way I can build the query for the second list box including a variable? I know exactly how I'd do it using mySQL and PHP but until now I've avoided access.
If someone could help I would be most grateful.
Thanks
Jordan
I'm not sure if this has been answered before... I've looked back quite far and I can't see an answer. I'm sure my problem will be very simple for someone to solve...
I have two drop down boxes to select items from a table; the data looks a little like this,
R1 R2 Sys Sub
1 0 A a
1 1 A b
1 2 A c
1 3 A d
1 4 A e
2 0 B f
2 1 B g
2 2 B h
2 3 B i
3 0 C j
I have the first drop down box selecting all unique values of R1, so a list of A,B,C,D,E,F,G.... ( SELECT DISTINCT Sheet1.R1, Sheet1.System FROM Sheet1 ORDER BY R1; )
The second drop down box uniquely selects R2, so lists a,b,c,d,e,f,g... ( SELECT DISTINCT Sheet1.R2, Sheet1.R1, Sheet1.Subsystem FROM Sheet1 ORDER BY R1 ASC, R2 ASC; ) when you select from the first drop down box, the second box becomes focused on whichever sub corresponds to R1=selected and R2=0.
The thing is I want to LIMIT the second drop down list to only the R2 at a given R1.
does that make sense? basically I want to filter the list in the second box. Is there some way I can build the query for the second list box including a variable? I know exactly how I'd do it using mySQL and PHP but until now I've avoided access.
If someone could help I would be most grateful.
Thanks
Jordan