I have the following code on my form to assist with autofilling other controls on my form. This works great, however, once the county field value has changed I cannot move to other fields on my form.
*******Begin Code*******
Private Sub County_AfterUpdate()
If IsNull(Me.County) = True Or Len(Trim(Me.County)) = 0 Then
Me.DistrictNum.RowSource = "County?"
Else
Me.DistrictNum.RowSource = "SELECT Distinct TaxCode From Counties WHERE Abbrev = '" & Me.County & "' ORDER BY TaxCode"
Me.EEO_Region.RowSource = "SELECT Distinct EconArea From Counties WHERE Abbrev = '" & Me.County & "' ORDER BY EconArea"
Me.Craft.RowSource = "SELECT Distinct Craft From Counties WHERE Abbrev = '" & Me.County & "' ORDER BY Craft"
Me.DistrictNum.Requery
Me.EEO_Region.Requery
Me.Craft.Requery
Me.DistrictNum.Selected(0) = True
Me.EEO_Region.Selected(0) = True
Me.Craft.Selected(0) = True
End If
End Sub
*********End Code*********
I know I am missing something simple but I am stumped. Any ideas?
*******Begin Code*******
Private Sub County_AfterUpdate()
If IsNull(Me.County) = True Or Len(Trim(Me.County)) = 0 Then
Me.DistrictNum.RowSource = "County?"
Else
Me.DistrictNum.RowSource = "SELECT Distinct TaxCode From Counties WHERE Abbrev = '" & Me.County & "' ORDER BY TaxCode"
Me.EEO_Region.RowSource = "SELECT Distinct EconArea From Counties WHERE Abbrev = '" & Me.County & "' ORDER BY EconArea"
Me.Craft.RowSource = "SELECT Distinct Craft From Counties WHERE Abbrev = '" & Me.County & "' ORDER BY Craft"
Me.DistrictNum.Requery
Me.EEO_Region.Requery
Me.Craft.Requery
Me.DistrictNum.Selected(0) = True
Me.EEO_Region.Selected(0) = True
Me.Craft.Selected(0) = True
End If
End Sub
*********End Code*********
I know I am missing something simple but I am stumped. Any ideas?