G
Guest
I currently have a form with 2 dropdowns 1) state - cbostate 2) cbocounty. I
have a routine where I select if I select a state the counties for that
state are brought up and i am able to process my information.
The current statment I use for the routine is:
Dim rst As DAO.Recordset
strsql = "SELECT tblcounties.CountyName " & _
"FROM tblstates INNER JOIN tblcounties ON tblstates.StateID = " & _
"tblcounties.StateID " & _
"WHERE tblstates.StateName ='" & [Forms]![FORM1]![cboState].Text & "'" & _
"Order by tblcounties.countyname"
Set rst = CurrentDb.OpenRecordset(strsql, dbOpenDynaset)
My question is how to make statename ([Forms]![FORM1]![cboState].Text )
advance or will I need to create another strsql statement. I have a couple
of concerns. First being that if I add a record to states table called 'all
states' that the REAL statename (cbostate) wont work. Or 2 that the
countyname will interfere since there are multiple counties named the same
but in different states.
Can I maybe have a chkbx on form where if clicked after routine is finished
focus will be brought back to cbostate +1? I just dont know how I should
proceed. Any suggestions and or help would be greatly appreciated.
Thanks,
Jack
have a routine where I select if I select a state the counties for that
state are brought up and i am able to process my information.
The current statment I use for the routine is:
Dim rst As DAO.Recordset
strsql = "SELECT tblcounties.CountyName " & _
"FROM tblstates INNER JOIN tblcounties ON tblstates.StateID = " & _
"tblcounties.StateID " & _
"WHERE tblstates.StateName ='" & [Forms]![FORM1]![cboState].Text & "'" & _
"Order by tblcounties.countyname"
Set rst = CurrentDb.OpenRecordset(strsql, dbOpenDynaset)
My question is how to make statename ([Forms]![FORM1]![cboState].Text )
advance or will I need to create another strsql statement. I have a couple
of concerns. First being that if I add a record to states table called 'all
states' that the REAL statename (cbostate) wont work. Or 2 that the
countyname will interfere since there are multiple counties named the same
but in different states.
Can I maybe have a chkbx on form where if clicked after routine is finished
focus will be brought back to cbostate +1? I just dont know how I should
proceed. Any suggestions and or help would be greatly appreciated.
Thanks,
Jack