G
Guest
The following code give me a compile error and I can't figure out why
Private Sub PrspDemoState_AfterUpdate()
PrspDemoCounty.RowSource = "SELECT CntyDesc From tbl_Counties" where
CntyState = "'" & PrspDemoState.Value & "'"
End Sub
What I'm trying to do is the following:
I want to restrict the list of counties to only those counties that the user
has entered the appropriate state abreviation for.
PrspDemoCounty is the name of the field on my form that is a list box for
the counties names.
CntyDesc is the field that I want the user to see. This information is
located in a table called tbl_Counties.
tbl_Counties. This table contains all the county names for each state.
CntyState located in the table tbl_Counties references what county name is
assigned to that particular state.
PrspDemoState is the field on the form that the user enter in the state
information. The state code is coming from another table called tbl_States.
The reason I need to have the counties separated out in a different table is
because I have representatives attached to specific counties in each state.
However, some states have the same county name.
Can anyone help with this. Thx
Private Sub PrspDemoState_AfterUpdate()
PrspDemoCounty.RowSource = "SELECT CntyDesc From tbl_Counties" where
CntyState = "'" & PrspDemoState.Value & "'"
End Sub
What I'm trying to do is the following:
I want to restrict the list of counties to only those counties that the user
has entered the appropriate state abreviation for.
PrspDemoCounty is the name of the field on my form that is a list box for
the counties names.
CntyDesc is the field that I want the user to see. This information is
located in a table called tbl_Counties.
tbl_Counties. This table contains all the county names for each state.
CntyState located in the table tbl_Counties references what county name is
assigned to that particular state.
PrspDemoState is the field on the form that the user enter in the state
information. The state code is coming from another table called tbl_States.
The reason I need to have the counties separated out in a different table is
because I have representatives attached to specific counties in each state.
However, some states have the same county name.
Can anyone help with this. Thx