Thanks in advance. I have a form with the field AREA where I can select from two choices (Handset or Polymer) in a drop down combo box. This same form also has another combo box titled Location. I want the choices in the LOCATION box to be dependent upon the selection in the AREA combo box. For instance... If I select "HANDSET" from the two selections offered in the AREA combo box, I want the LOCATION combo box to offer me selections from a query that sorts ONLY the locations associated with Handset. I have the lists for LOCATION saved as separate tables. I have a Handset Location table and a Polymer Location table. In addition, to assure that I get an alphabetical listing, I created queries that sort and present the Location tables in Ascending alpha order. I think I need code as follows:
Private Sub Location_Enter()
Dim strSql1 As String
Dim strSql2 As String
strSql1 = "qry_HandsetLocationALPHA"
strSql2 = "qry_PolymerLocationAlpha"
If Me.AreaID.Value = "Handset" Then
Me.Location.RowSource = strSql1
ElseIf Me.AreaID.Value = "Polymer" Then
Me.Location.RowSource = strSql2
Else
End If
End Sub
Code does not work.
The table value of Location is TEXT. I'm stuck on how to make this happen. If I choose HANDSET in the AREA filed, I want to be able to select from one of 8 locations in qry_HandsetLocationALPHA (and if I select POLYMER I want to select from qry_PolymerLocationAlpha)and have that value save to my table under LOCATION column.
Need direction please. Thanks
Private Sub Location_Enter()
Dim strSql1 As String
Dim strSql2 As String
strSql1 = "qry_HandsetLocationALPHA"
strSql2 = "qry_PolymerLocationAlpha"
If Me.AreaID.Value = "Handset" Then
Me.Location.RowSource = strSql1
ElseIf Me.AreaID.Value = "Polymer" Then
Me.Location.RowSource = strSql2
Else
End If
End Sub
Code does not work.
The table value of Location is TEXT. I'm stuck on how to make this happen. If I choose HANDSET in the AREA filed, I want to be able to select from one of 8 locations in qry_HandsetLocationALPHA (and if I select POLYMER I want to select from qry_PolymerLocationAlpha)and have that value save to my table under LOCATION column.
Need direction please. Thanks