473,413 Members | 2,066 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,413 software developers and data experts.

Equivalent VB Code

Is there any known defects with respect to Databinding to
a ComboBox that is located on a UserForm?

I have a scenario on one of my forms that I have spent
HOURS trying to solve that has completely crushed my
morale.

Essentially I setup the combobox with a datasource and the
appropriate DataMember and Value Member (everything
appears perfect on the screen when I click the dropdown).
However when I fetch the data into the dataset the
contents of the ComboBox is always blank.
cboTerms.DataSource = dsLookup
cboTerms.ValueMember = "lk_Term.Term_pk"
cboTerms.DisplayMember = "lk_Term.Description"
Me.cboTerms.DataBindings.Add("SelectedValue",
dsCustomer, "Customer.LK_Terms_pk"))

dsCustomer.Fill()

I have also tried attaching a different BindingContext to
the Combo, also to no avail.

Two other combos on this screen are also behaving this way.

I have about 10 other forms in my application that operate
EXACTLY the same way without any problem(they are also on
usercontrols). Why just this particular screen?

If anyone has any ideas, anything at all, I'd be forever
grateful.

Down and out (but not for the count),

David

Nov 20 '05 #1
2 1757
-----Original Message-----
Is there any known defects with respect to Databinding to
a ComboBox that is located on a UserForm?

I have a scenario on one of my forms that I have spent
HOURS trying to solve that has completely crushed my
morale.

Essentially I setup the combobox with a datasource and theappropriate DataMember and Value Member (everything
appears perfect on the screen when I click the dropdown).
However when I fetch the data into the dataset the
contents of the ComboBox is always blank.
cboTerms.DataSource = dsLookup
cboTerms.ValueMember = "lk_Term.Term_pk"
cboTerms.DisplayMember = "lk_Term.Description"
Me.cboTerms.DataBindings.Add("SelectedValue",
dsCustomer, "Customer.LK_Terms_pk"))

dsCustomer.Fill()

I have also tried attaching a different BindingContext to
the Combo, also to no avail.

Two other combos on this screen are also behaving this way.
I have about 10 other forms in my application that operateEXACTLY the same way without any problem(they are also on
usercontrols). Why just this particular screen?

If anyone has any ideas, anything at all, I'd be forever
grateful.

Down and out (but not for the count),

David

.

Nov 20 '05 #2
Hi David,

I have replied to your another post in the newsgroup queue.
DataBinding problem with Combobox
You may have a check and let me know if that does the job for you.

Regards,
Peter Huang
Microsoft Online Partner Support
Get Secure! www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

--------------------
Content-Class: urn:content-classes:message
From: "David Kozak" <dr*****@no-spam.hotmail.com>
Sender: "David Kozak" <dr*****@no-spam.hotmail.com>
References: <0a****************************@phx.gbl>
Subject: Incorrect Subject line...Reposted
Date: Tue, 30 Sep 2003 13:57:24 -0700
Lines: 43
Message-ID: <0a****************************@phx.gbl>
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Newsreader: Microsoft CDO for Windows 2000
Thread-Index: AcOHlXM3kFaio8wRQwS2V7HsjMJVIg==
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
Newsgroups: microsoft.public.dotnet.languages.vb
Path: cpmsftngxa06.phx.gbl
Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.languages.vb:142649
NNTP-Posting-Host: TK2MSFTNGXA09 10.40.1.161
X-Tomcat-NG: microsoft.public.dotnet.languages.vb

-----Original Message-----
Is there any known defects with respect to Databinding to
a ComboBox that is located on a UserForm?

I have a scenario on one of my forms that I have spent
HOURS trying to solve that has completely crushed my
morale.

Essentially I setup the combobox with a datasource and

the
appropriate DataMember and Value Member (everything
appears perfect on the screen when I click the dropdown).
However when I fetch the data into the dataset the
contents of the ComboBox is always blank.
cboTerms.DataSource = dsLookup
cboTerms.ValueMember = "lk_Term.Term_pk"
cboTerms.DisplayMember = "lk_Term.Description"
Me.cboTerms.DataBindings.Add("SelectedValue",
dsCustomer, "Customer.LK_Terms_pk"))

dsCustomer.Fill()

I have also tried attaching a different BindingContext to
the Combo, also to no avail.

Two other combos on this screen are also behaving this

way.

I have about 10 other forms in my application that

operate
EXACTLY the same way without any problem(they are also on
usercontrols). Why just this particular screen?

If anyone has any ideas, anything at all, I'd be forever
grateful.

Down and out (but not for the count),

David

.


Nov 20 '05 #3

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

Similar topics

4
by: Hai Nguyen | last post by:
I'm learning C sharp and do not like vb much. I'm creatiing a wepage using panel to test myself. I tried to use these code below, which is written in VB, and to transform them to c sharp but I got...
8
by: Xucyr | last post by:
I can't find any "short" code to make this work without taking 100s of lines (because I have to keep repeating this process several times). But this is what I have so far: int i = 7; do {...
9
by: Alan Silver | last post by:
Hello, I'm converting some old VB6 code to use with ASP.NET and have come unstuck with the Asc() function. This was used in the old VB6 code to convert a character to its ASCII numeric...
48
by: Daniel Crespo | last post by:
Hi! I would like to know how can I do the PHP ternary operator/statement (... ? ... : ...) in Python... I want to something like: a = {'Huge': (quantity>90) ? True : False} Any...
14
by: grid | last post by:
Hi, I have a certain situation where a particular piece of code works on a particular compiler but fails on another proprietary compiler.It seems to have been fixed but I just want to confirm if...
5
by: lcw1964 | last post by:
Greetings again, I will burden the group with yet another tenderfoot question, but since conscientious googling hasn't yield a lucid answer I thought I would risk the shortcut of asking here...
8
by: Jon Paal | last post by:
what is vb equivalent to this C# code ? converters failed to handle this "using (SQLiteTransaction mytransaction = myconnection.BeginTransaction())"
6
by: Jon Paal | last post by:
what is vb equiv. of ++ shown in C# ?
22
by: Kurien Mathew | last post by:
Hello, Any suggestions on a good python equivalent for the following C code: while (loopCondition) { if (condition1) goto next; if (condition2) goto next;
11
by: gnuist006 | last post by:
Is there a Delphi equivalent in the C world or Scheme/LISP world ? Recently, Delphi is in resurgence. In Russia people are using like crazy. For example, Bolega has written a free image...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
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...

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.