I want to have a drop down list of cities that belong to its state.
So let's say if
A1 = Virginia, then B1 listbox should list all of the cities of Virginia.
A1 = California, then B1 listbox should list all of the cities of California.
and so on...
There are 50 states; therefore, I don't think I can do a nested if for this. I created a User Defined function as below:
Where ViginiaCities and CaliforniaCities are Named fields.Function City(State As String) As String
Select Case State
Case Is = "Virginia"
City = VirginiaCities
Case Is = "California"
Grades = CaliforniaCities
End Select
End Function
My function obviously doesnot work, so I don't know if Named field is allowed in this case? If so, where is wrong in this function?
I thank you very much for any help (even with different approach, don't have to be a function solution) !
Valkie
Bookmarks