Fordraiders
asked on
trim dropdown value before executing query
Access 2010 vba
I have a combobox where the row source is a query.
When a value/copied and pasted./ typed into the combo box.
The query brings back the result.
I want to trim the value pasted before the query executes ?
me.cbo_Names = trim(me.cbo_names)
Thanks
fordraiders
I have a combobox where the row source is a query.
When a value/copied and pasted./ typed into the combo box.
The query brings back the result.
I want to trim the value pasted before the query executes ?
me.cbo_Names = trim(me.cbo_names)
Thanks
fordraiders
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Also, what is the purpose of trimming the value? Trim() just removes extra space. Do you need something more than that?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
just trying to remove spaces
ASKER
Thanks all...
you're welcome ~ happy to help
if the combo is not limited to the list, provided it is a string, you can do this on the control After Update event:
if the combo is not limited to the list, provided it is a string, you can do this on the control After Update event:
with me.controlname
if isnull(.value) then exit sub
.value = trim(.value)
end with
Glad you were able to get what you were after.
;-)
;-)