Apologies up front, but I'm a newbie trying to run some VBA code to simply populate a combo box using a value queried from a second combo box. Even though the code doesn't give me an error, when the script finishes, there is nothing populated in the second combo box, even after doing a requery. State is the 1st combo box and cbo_GACC is the 2nd combo box I'm trying to populate.
Private Sub Form_Load()
' Clear the form for the next user
DoCmd.GoToRecord , , acNewRec
End Sub
Private Sub State_Change()
Dim StateName As String
Dim StateAbbrSQL As String
Dim GACC_Name As String
StateName = [State].Value
StateAbbrSQL = "SELECT States.State_Abbr FROM States WHERE (((States.State_Name) = 'Arizona'))"
cbo_GACC.RowSourceType = "Table/Query"
cbo_GACC.RowSource = StateAbbrSQL
cbo_GACC.Requery
End Sub
Any suggestions would be greatly appreciated.
Thanks in advance.