Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Line count from the dropdown box in Form

Status
Not open for further replies.
Dec 23, 2004
33
US
I have a dropdown box in the form in access. It lists all the state names. If I select CT, my State = CT and my StateNum = 2. How do I write code to get the index of the state that I selected? Thanks

1 AL
2 CT
3 NY


Sub Enter_click

State = MyForm.State
StateNum = MyForm.State.linecount???
...

unload me
end sub
 
I'd try the ListIndex Property

Hope it helps,

Roel
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top