Hi,
Is it OK to bind a combo box to more than one datasource?
One is by:
Me.cboState.DataBindings.Add(New Binding("SelectedValue", Me.AddressRow,
"State"))
Another is by a DataView:
aView = New DataView(dsLookup.States)
With Me.cboState
.DataSource = aView
.DisplayMember = "Description"
.ValueMember = "StateAbbr"
End With
Look like it works. But sometimes the field gets empty when I click the
fields around. I steped in and couldn't find any codes doing that. So I
suspect it is a binding issue.
Please help.
Thanks in advance.
Li 5 1232
Hi Li,
First of all, I would like to confirm my understanding of your issue. From
your description, I understand that you need to know if we can add multiple
databindings to a ComboBox. If there is any misunderstanding, please feel
free to let me know.
Yes, we can add different bindings to different properties for a control.
But we can add only one binding for one property. Based on the code you
have provided, it is correct. However, I'm not quite sure what you mean by
"the field gets empty when I click the fields around". Could you explain it
a little bit more? Thanks!
Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."
Hi, Kevin:
After debugging, I found out that after I input something in a text box or
make a selection from a combo box, I click other field. Now the form's
IsDisposed = True and causes all controls' IsDisposed = True. That causes the
fields empty, cursor stuck, etc. But after I click several times, the cursor
moves and everything is ok.
I know it looks weird. But do you have any suggestions about how this may
happen? The form is created as a dialog form.
Thanks.
Li
"Kevin Yu [MSFT]" wrote: Hi Li,
First of all, I would like to confirm my understanding of your issue. From your description, I understand that you need to know if we can add multiple databindings to a ComboBox. If there is any misunderstanding, please feel free to let me know.
Yes, we can add different bindings to different properties for a control. But we can add only one binding for one property. Based on the code you have provided, it is correct. However, I'm not quite sure what you mean by "the field gets empty when I click the fields around". Could you explain it a little bit more? Thanks!
Kevin Yu ======= "This posting is provided "AS IS" with no warranties, and confers no rights."
Hi Li,
This is weird. To make debugging simpler, could you send me a simple
project that can reproduce the problem? I can debug it on my machine and
work it out more quickly. Thank you.
Remove 'online' from the nospam alias is my email.
Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."
Hi, Kevin:
I couldn't create a sample from our project to reproduce the problem. I
dis-bind the fields to workaround the problem.
Now I have another problem but I will post as another thread to have the
Subject related to the issue.
Thanks.
Li
"Kevin Yu [MSFT]" wrote: Hi Li,
This is weird. To make debugging simpler, could you send me a simple project that can reproduce the problem? I can debug it on my machine and work it out more quickly. Thank you.
Remove 'online' from the nospam alias is my email.
Kevin Yu ======= "This posting is provided "AS IS" with no warranties, and confers no rights."
Nice to hear that you have found a workaround.
Thanks for sharing your experience with all the people here. If you have
any questions, please feel free to post them in the community.
Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights." This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Fernb2000 |
last post by:
Hello I have a dataset is composed of a table that has a Name and Id
colums. I would like to fill the combo box with the List of names from
the dataset and I would like the text box to be the id...
|
by: FZ |
last post by:
Hi Gang,
I was wondering if a generous person might be able to walk me
through what I believe is a pretty simple task. I actually have
significant Access experience, but I haven't done it in...
|
by: James |
last post by:
I have a bound combo using a lookup table which is behaving as
expected with the exception of the first record.
In the list of rows for my combo, the first is '.'. This is because of
another...
|
by: Brian Henry |
last post by:
Here's an example of the code.. I have two combo boxes on screen that when
one's selection is change the other's items will be updated to reflect the
change (based on a relation)
Private...
|
by: Richard |
last post by:
I have created a form which sets up a dataview. The form views one
record at a time using a currencymanager. This works fine. All my
text boxes bind.
However I have a combo box which gets its...
|
by: Li Weng |
last post by:
Hi,
Is it OK to bind a combo box to more than one datasource?
One is by:
Me.cboState.DataBindings.Add(New Binding("SelectedValue", Me.AddressRow,
"State"))
Another is by a DataView:
aView =...
|
by: Bill |
last post by:
I have what I think should be a simple question regarding a bound combo box.
My first table is Dealers:
DealerID - primary key
DealerName
BillToLocation
My second table is Locations:...
|
by: =?Utf-8?B?UmVkYmFjaw==?= |
last post by:
Hi All,
slight problem I hope someone could shed some light on.
I am using VS 2005.
In a datagridview I have 2 comboboxes that are both bound to a table field
called "empCode". This is an...
|
by: jaymaelescent |
last post by:
I have been asked by worklace to try and make a database for them, i have some experience but have encountered a problem making user specific reports. I need to make a report based on a person stored...
|
by: DolphinDB |
last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation.
Take...
|
by: DolphinDB |
last post by:
Tired of spending countless mintues downsampling your data? Look no further!
In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
|
by: ryjfgjl |
last post by:
ExcelToDatabase: batch import excel into database automatically...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: Vimpel783 |
last post by:
Hello!
Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
|
by: ArrayDB |
last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
|
by: Defcon1945 |
last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
|
by: Shællîpôpï 09 |
last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
|
by: af34tf |
last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
| |