Mid and combo box

alpapak

Registered User.
Local time
Today, 10:42
Joined
Apr 3, 2006
Messages
64
hi

i have a continious form with a combobox and the data has the format

customer John
customer Peter
customer Mary
customer Nick

i want to hide the word "customer " after i make my choice

i tried something in the after update

me.cmbbox = mid(me.cmbbox, 8)

but it delete my choice

any help!!!
 
Hi, Aplpapak!

If I understood your problem correctly, you want to modify the data shown in your combobox.
I presume that the row source of you combobox is some table/query.
If yes, you do only simple thing (I think).
In design mode of your form select Properties of your cmbbox, select "Row source". Opening the source/creating a query from a table source (if) you can modify the query as the row source.
You Just simply change your original table/query field into your customized form e.g.:
If you name of the field is e.g. "Customers", you name it as you want e.g. "CustNew" and the syntax would be "Customers:Mid([Customers];len([Customers])-9)". This would return already modified string as the result of the query as the source for your cmbbox. So cmbbox will display then these modified values in your selection. I suppose you have at least two field selected for the row source of cmbbox. The first one is the bound value (normally hidden), the second one is the one to be displayed for users.

I am not sure if this was clear enough and if my understanding of your problem was correcto.

Regards

Krava.
 
you are correct and very good answer
so simple...

thxs a lot Krava.
 

Users who are viewing this thread

Back
Top Bottom