M
Miro
VB.net 2005 Expess - and an SQL Express db
I cant seem to figure out a way to bind a ComboBox properly.
I have set up a dummy app with a dummy file
I have 2 datatables,
Table: LoginUsers
LoginID int autoincrement allownulls = false
LoginName Varchar15
Table: People
PersonID int autoincrement allownulls = false
PersonName Varchar15
LoginID int allownulls = true
Relationship is set up with People.LoginID to LoginUsers.LoginID
This way I can have "people" in a list, and assign them generic Login Names
if they have a loginID. Otherwise they cant login. This project really
has no point but im trying to teach myself how to use multi tables in 1
form.
First step: I just have 2 forms.
LoginUsers form - this works fine, I can add and delete LoginUsers into the
datafile.
My People form does not.
I went to my Datasources tab and dragged over the Person.PersonName
(textbox)and Person.LoginID which is a combobox.
I am trying to have the Combobox bound to People.LoginID, but display
LoginUsers.LoginName
When a user selects a LoginName from the list, it should internally write
the LoginUsers.LoginId to the People.LoginID field - but always displaying
the LoginUsers.LoginName
I have tried the combobox -databindings SelectedItem / Selected Value,
text and DataSource and cant figure out what objects to set where.
I have even downloaded this example from the help:
ms-help://MS.VSExpressCC.v80/MS.NETFramework.v20.en/dv_vbcode/html/78785cc4-5f9d-45d9-a0c9-59f838a49c31.htm
But they do this internally through code - and with an arraylist. Im trying
at first to try to set something like this up using the properties on the
forms designer - not by code. - babyseps
Can someone help me out please.
Thanks,
Miro
I cant seem to figure out a way to bind a ComboBox properly.
I have set up a dummy app with a dummy file
I have 2 datatables,
Table: LoginUsers
LoginID int autoincrement allownulls = false
LoginName Varchar15
Table: People
PersonID int autoincrement allownulls = false
PersonName Varchar15
LoginID int allownulls = true
Relationship is set up with People.LoginID to LoginUsers.LoginID
This way I can have "people" in a list, and assign them generic Login Names
if they have a loginID. Otherwise they cant login. This project really
has no point but im trying to teach myself how to use multi tables in 1
form.
First step: I just have 2 forms.
LoginUsers form - this works fine, I can add and delete LoginUsers into the
datafile.
My People form does not.
I went to my Datasources tab and dragged over the Person.PersonName
(textbox)and Person.LoginID which is a combobox.
I am trying to have the Combobox bound to People.LoginID, but display
LoginUsers.LoginName
When a user selects a LoginName from the list, it should internally write
the LoginUsers.LoginId to the People.LoginID field - but always displaying
the LoginUsers.LoginName
I have tried the combobox -databindings SelectedItem / Selected Value,
text and DataSource and cant figure out what objects to set where.
I have even downloaded this example from the help:
ms-help://MS.VSExpressCC.v80/MS.NETFramework.v20.en/dv_vbcode/html/78785cc4-5f9d-45d9-a0c9-59f838a49c31.htm
But they do this internally through code - and with an arraylist. Im trying
at first to try to set something like this up using the properties on the
forms designer - not by code. - babyseps
Can someone help me out please.
Thanks,
Miro