On 1 Jan, 17:02, "Cor Ligthert[MVP]" <notmyfirstn...@planet.nl> wrote:
> myListBox.DataSource = MyTable
> myListBox.DisplayMember = "BranchName"
> myListBox.ValueMember = "MyIDName"
>
> With a ; at the end in C#
>
> TheOtherTable.Rows(TheRowRowNumber).Item("TheField") =
> myListBox.SelectedValue
> or in C#
> TheOtherTable[TheRowNumber]["TheField"] = myListBox.SelectedValue;
>
> Cor
>
> <dgcar...@hotmail.com> schreef in berichtnews:(E-Mail Removed)...
>
>
>
> > On Mon, 31 Dec 2007 11:06:16 +0100, "Cor Ligthert[MVP]"
> > <notmyfirstn...@planet.nl> wrote:
>
> >>John,
>
> >>Just get the table in any way, if that is a datatable, then it is just
> >>setting the datasource to the table, the displaymember to the columname
> >>(as
> >>datable.Column.Columname or as string) and the same for the valuemember
>
> >>To get the table you need OleDB.
>
> >>It is so simple that there are probably no samples for this.
>
> >>Cor
> > If I can do a follow on from there.
>
> > If the table the data is coming from is a lookup table (say a unique
> > ID and a branch name), if I have branch name as the displaymember and
> > the unique id as the value member. *How would I then go away saving
> > the value of the unique id to another table?
>
> > Don- Hide quoted text -
>
> - Show quoted text -
Thanks Cor,
I'll give that a try.
Don
|