473,499 Members | 1,610 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Combo Box - set text problem

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 !!

Nov 21 '05 #1
2 3578
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" <ag***@dynamictech.com.hk>
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 !!


Nov 21 '05 #2
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" <no************@planet.nl> ¦b¶l¥ó
news:u1****************@TK2MSFTNGP11.phx.gbl ¤¤¼¶¼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" <ag***@dynamictech.com.hk>
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 !!



Nov 21 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
3714
by: Daniel Hill | last post by:
OK, I have very, VERY basic background knowledge of VB6 and have now upgraded to VB.NET and now I'm struggling to bring up the forms I want. What I am looking to do is to have a click a command...
0
1625
by: John Wind | last post by:
Hello, I posted this problem in a thread on a seperate message, I'm not sure I did it right so I started a new message, sorry for any problem this has caused. This problem has me pulling my hair...
0
1442
by: Mike | last post by:
My original problem was solved by Bruce Dodds (Thanks!!) ORIGINAL PROBLEM I have developed an application for data enty for daily production in my factory. I have one combo box for shifts...
6
3741
by: Ron L | last post by:
I have a dataset whose source is a SQL 2k stored procedure that I am trying to display in a datagrid. This datasource has 4 columns that I am interested in here, a text column and 3 value columns...
4
1755
by: Mark L. Breen | last post by:
Hello Guys and Galls, I use combos on my forms. The code to initialise the combos is as follows Dim dsPIDTypes As DataSet dsPIDTypes = PartDB.GetPIDTypes ' Returns a dataset object...
9
6741
by: Edwinah63 | last post by:
Hi everyone, Please let there be someone out there who can help. I have two BOUND combo boxes on a continuous form, the second being dependent on the first. I have no problem getting the...
0
1579
by: Tom | last post by:
I have some very strange issues with combo boxes on a tab control. Here's the scenario: I have a Windows Forms form that has a tab control on it, with two (2) tabs. Tab 2 happens to have a number...
4
2350
by: Dave | last post by:
I wasn't sure how to search for previous posts about this, it felt real specific. Ok so here's the database & problem: I have 4 combo boxes: cboServer, cboPolicy, cboDB, and cboApplication. ...
2
7013
by: biganthony via AccessMonster.com | last post by:
Hi, I decided to install Office 2003 Service Pack 3 on my home computer to test (in full knowledge that there may be some issues with it). After installation, I have noticed that with a small...
6
1859
by: =?Utf-8?B?amVmZmVyeQ==?= | last post by:
i need help with a combo box and this same code works on my first tab with a combo box. The error or problem i have is this code causes an index out of range error when i run it on my second combo...
0
7132
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7009
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7223
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7390
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
4602
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3103
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3094
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
665
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
302
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.