Hello,
I am working in Access 2007.
I was able to create County combo box County that limits its list based on the selection made in State combo box. I was also able to create a County ID list box that limits its list based on the selection made in County combo box. For example the State combo box contains the states. The County combo box B contains the county names. The County ID list box contains the COUNTY ID numbers. I selected row source type Table/Query and entered the following code in row source.
To filter the proper county associated with the state - [Forms]![Form1]![State]
To filter the proper county id number associated with the county - [Forms]![Form1]![County]
I created a Description memo box to string the state name, county name, and county ID number. Here is the code I used.
Private Sub State_AfterUpdate()
Me.County = Null
Me.County.Requery
Me.County = Me.County.ItemData(0)
End Sub
Private Sub County_AfterUpdate()
Me.CountyID = Null
Me.CountyID.Requery
Me.CountyID = Me.CountyID.ItemData(0)
[Description] = Me.State & " " & Me.County & " " & Me.CountyID
End Sub
The problem is that the county ID shows up in place of the county name in the Description memo.
For example this is the result I am looking for in the memo box “Arizona Good 0001”.
I am getting this result instead “Arizona 001 0001”.
Please help.
Thank you.
GMSRE
I am working in Access 2007.
I was able to create County combo box County that limits its list based on the selection made in State combo box. I was also able to create a County ID list box that limits its list based on the selection made in County combo box. For example the State combo box contains the states. The County combo box B contains the county names. The County ID list box contains the COUNTY ID numbers. I selected row source type Table/Query and entered the following code in row source.
To filter the proper county associated with the state - [Forms]![Form1]![State]
To filter the proper county id number associated with the county - [Forms]![Form1]![County]
I created a Description memo box to string the state name, county name, and county ID number. Here is the code I used.
Private Sub State_AfterUpdate()
Me.County = Null
Me.County.Requery
Me.County = Me.County.ItemData(0)
End Sub
Private Sub County_AfterUpdate()
Me.CountyID = Null
Me.CountyID.Requery
Me.CountyID = Me.CountyID.ItemData(0)
[Description] = Me.State & " " & Me.County & " " & Me.CountyID
End Sub
The problem is that the county ID shows up in place of the county name in the Description memo.
For example this is the result I am looking for in the memo box “Arizona Good 0001”.
I am getting this result instead “Arizona 001 0001”.
Please help.
Thank you.
GMSRE