Bind list box column to a table field

unknown1

Registered User.
Local time
Today, 09:30
Joined
Mar 6, 2010
Messages
13
hey

i am doing a prject for school.

how can i bind a column in a list box to a table field ?

thnx

uknown
 
Make that column the bound column, and set the control source of the listbox to the appropriate field.
 
Thnx for the quick reply....
can u tell me how to set a column to bound column ?

and what if i have 3 coloums in a list box?
how can i bind each coloum to a field in a table?
 
ok, i found how to set a column to bound coulum than chande it from control source...

but ma other probllem:(
 
The bound column is the unique column. The other columns do not need to be bound. If you want the other columns to be displayed you simply select all of them in your Row Source and change the Column Widths property to something like this:

0cm;2cm;2cm;2cm

Assuming that the first column is your ID, you obviously don't want that visible.

The semi-colon separates each column width. Ensure that the combined number does not exceed the width of your list box. Play with the numbers to get your desired widths.
 
thnx for ur quick reply

let me explain my problem a little further...

i have costumer table, prodcut table and a new order table with a form.

in the new order form i want a list box that shows me cosutmer ID, Costumer name, etc.

so in the new order form i create a list box from the costumers table showing all required information Id, name....

and a list box from the product table having prodduct Id , name, price...

now if i choose a prodcut from the list, product Id should be bound to the table of new order with product ID...product name bound with product name of new order table and product price bound with product price of the new order table...

the same thing goes for cosutmer
 
but my problem is not that i cant c the columns in the list box..
i need each column to be bound to a diffrent field in a table
 
thnx for ur quick reply..

ma problem is not that i cant not c the coulumn...

i have list box in an ORDER FORM...that takes its information from the PRODUCT TABLE.

for this list i got the columns product ID...product name and product price...

now i need to bound product Id (column1)and product name(column3) and product price(column3) of the listbox seperatly to prodcut id , name and price in the ORDER TABLE....

how can i do this?
 
Re-read what I mentioned in my last post. It's explained there.
 
sryy man
i ddnt get u...


can u give me lyk a step by step explanation how to do it?/

i would appreciate iiit


thnx in advace
 
I will do my best. Firstly,

what do you understand by bind? what do you mean by this statement:
now i need to bound product Id (column1)and product name(column3) and product price(column3) of the listbox seperatly to prodcut id , name and price in the ORDER TABLE....
 
hmm..
like u have a text box..ryt?

this text box is bound to a field in a table..
meaning wateva i type into that field will afterwards appear in the table.

the same way i want to bound diffrent coloumns of the same list box to diffrent fields in the table
 
Editting of each column in a list box cannot be done. You can create a subform and set it to Datasheet view and that will serve the purpose.
 
kkk
so o created a subform in datasheet view..

how can i set the control source to the field in the table of the main form?
 
Did you follow the wizard when you dropped the subform on your form?
 
yea...but somehow i dont get all the record listed in the stock table...
 
Your subform is showing the records that matches with your main form's ID.
 
yeah..like the subform shows me the record of the product Id used in the main form...
 
Hi
what I do when using combobox I state in the control source property where I want it stored.
On the form that field can/should be hidden but it gets the input from the combo box.
That should work.
Gunilla
 
That's how it works. The Child/Master links you created when you saw the wizard is what defines the relationship between your subform and your main form.

If you don't want it filtered and you want it to show all the records then click the subform control ONCE, go to the Data tab and remove the Link Master Fields and Link Child Fields properties.
 

Users who are viewing this thread

Back
Top Bottom