Good morning, I have a table with three fields, Buildings, Floors and
Rooms.
This is what I would like to do; in my form when I select Building1 in
my drop down box for Buildings, when I go to the next drop down field
which is Floors, all I would like to see is just the floors that
belong to Building1 only and then once I have selected a value for
Floors, when I go to the next drop down field which is Rooms, all I
want to see are the rooms that belong only to the previous selected
Floor value, which belongs to that specific selected Building only.
Right now, when I go to my form and go to these fields what I get is
everything that there is in the table. I get to see all the Floors and
Rooms values for every building out there regardless of the value I
have selected for Buildings. How can I prevent this from happening?
How can I tight down the Rooms values to the Floors and the Floors
values to the selected Buildings values?
So far this is what I have done:
Private Sub Floors_GotFocus(Floors)
' Passing on the value of Buildings in order to display Floors
' only pertaining to selected Building.
Dim stLinkCriteria As String
strSQL = "Select [Floors] from tblLocations where [Building]=" &
Me![Building]
End Sub
Thank you.