How do format a combo box control?
Posted on 2002-05-29
I am using WIN2000 Operating Systems with Visual Basic 6.0.
I have a combo box that needs to have a certain format when the length of the string in the combo box reaches a length of four characters.
For example: The first four characters in the combo box control has no format. After the user types in the fourth character, a dash (-), shows up in the combo box.
A maskEdit control gives a format property, but can't use the maskedit because its a textbox and doesn't have user choices like a combo box.
This statement doesn't work:
cbo_models = format(cbo_models, "####-##")
This may work when formatting dates and time.
Question: How would you format a data string using the combo box control?