PC Review


Reply
Thread Tools Rate Thread

Combo Box - set text problem

 
 
Agnes
Guest
Posts: n/a
 
      16th Nov 2004
My combo Box 's datasource is the table without databinding.
Now , i need to set some value , I try Me.cboUnit.Text =
drInvoice.item("unit") , HOWEVER, it didn't work . I can't assign to that
combo box. e,g drInvoice.item("unit") should be 'ABC'
(the user can select ABC from the combox BUT I cannot assign it , why ?)
i try to print messagebox.show(Me.cboUnit.Text & " " &
drInvoice.item("unit") )
drInvoice.item("unit") really store "ABC", but Me.cboUnit.Text got blank,
Please help !!





 
Reply With Quote
 
 
 
 
Cor Ligthert
Guest
Posts: n/a
 
      16th Nov 2004
Agnes,

Did you set the displaymember to the column of the datatable that has to be
showed.

\\\
mycombobox.displaymember = "mycolumn"
////
I hope this helps?

Cor

"Agnes" <(E-Mail Removed)>
> My combo Box 's datasource is the table without databinding.
> Now , i need to set some value , I try Me.cboUnit.Text =
> drInvoice.item("unit") , HOWEVER, it didn't work . I can't assign to that
> combo box. e,g drInvoice.item("unit") should be 'ABC'
> (the user can select ABC from the combox BUT I cannot assign it , why ?)
> i try to print messagebox.show(Me.cboUnit.Text & " " &
> drInvoice.item("unit") )
> drInvoice.item("unit") really store "ABC", but Me.cboUnit.Text got blank,
> Please help !!
>
>
>
>
>



 
Reply With Quote
 
Agnes
Guest
Posts: n/a
 
      16th Nov 2004
Dear Cor,
Me.cboUnit.text = drInvoice.item("unit") is work and I know what's wrong
with my data.
Basically, I import my vfp database into SQL sever, the field'unit' is
char(10) in VFP, but I changed it into nvarchar(10) into SQL Server, the
dtInvoice's data are imported from VFP.
My solution is " update invoice set unit = trim(unit)" then I can fill the
combo box now.
I spend over 10 hours about it ~~~~ Anyway . Thank for your reply

from agnes

"Cor Ligthert" <(E-Mail Removed)> ¦b¶l¥ó
news:u1%(E-Mail Removed) ¤¤¼¶¼g...
> Agnes,
>
> Did you set the displaymember to the column of the datatable that has to

be
> showed.
>
> \\\
> mycombobox.displaymember = "mycolumn"
> ////
> I hope this helps?
>
> Cor
>
> "Agnes" <(E-Mail Removed)>
> > My combo Box 's datasource is the table without databinding.
> > Now , i need to set some value , I try Me.cboUnit.Text =
> > drInvoice.item("unit") , HOWEVER, it didn't work . I can't assign to

that
> > combo box. e,g drInvoice.item("unit") should be 'ABC'
> > (the user can select ABC from the combox BUT I cannot assign it , why ?)
> > i try to print messagebox.show(Me.cboUnit.Text & " " &
> > drInvoice.item("unit") )
> > drInvoice.item("unit") really store "ABC", but Me.cboUnit.Text got

blank,
> > Please help !!
> >
> >
> >
> >
> >

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Having problem with combo box passing text into dest field. jeff Microsoft Access 8 21st Feb 2010 03:02 AM
Combo box text clearance problem naveen prasad Microsoft Access Queries 8 3rd Feb 2010 07:54 AM
Combo Box text display problem based on AfterUpdate... =?Utf-8?B?Sm9lIExlb24=?= Microsoft Access Forms 21 12th Aug 2009 11:45 PM
connected combo boxes (text in the second combo dissapears) =?Utf-8?B?dmFoaWQ=?= Microsoft Access Forms 0 15th Jun 2005 01:07 PM
Combo box current Text Problem =?Utf-8?B?U2FtdWVsIE1vdXJh?= Microsoft C# .NET 0 26th Mar 2004 12:16 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:50 PM.