Combo Box and Table

darno

Registered User.
Local time
Today, 05:38
Joined
May 25, 2005
Messages
67
Hi Folks,

I was wondering if its possible to populate multiple fields of a TABLE with a COMBO BOX?

Please provide an example to understand.

Your Help in this regard is highly appreciated

Regards

Darno
 
what are you trying to do? A combo box allows you to select 1 item from a query. It does mean that you already have an underlying query you could use to populate a table.
 
gemma-the-husky said:
what are you trying to do? A combo box allows you to select 1 item from a query. It does mean that you already have an underlying query you could use to populate a table.

Thanks for asking,

I donot have a query to work on. i simply have got 2 tables. all i need to do here is to create a combo box on a form that on selection could update 3 fields and purge the same data to a table. For example:
i create a combo named as COMBY, on drop down it shows me 3 columns with values in those columns. on selection of codeno field, the partnumber and description fields must get the corresponding values in form fields as well as table called stocks.

Hope u understand my problem

Regards

Darno
 
Right

on your form, you can retrieve the date from the columns of the combo box by

myfield1 = comby.columns(1) etc
myfield2 = comby.columns(2)

put this in the after update event of the combo

the columns in a combo start with column 0, not column 1, and the column numbering reflects the declared columns whether you can see them or not. eg column(1) is the second column in the source query even if the column width is set to 0 and you can't see it.


I'm not sure what you mean by writing the data to a table. If your form is bound to the table - ie has the table as the record source, your values will automatically be saved in the bound table.
 
gemma-the-husky said:
Right

on your form, you can retrieve the date from the columns of the combo box by

myfield1 = comby.columns(1) etc
myfield2 = comby.columns(2)

put this in the after update event of the combo

the columns in a combo start with column 0, not column 1, and the column numbering reflects the declared columns whether you can see them or not. eg column(1) is the second column in the source query even if the column width is set to 0 and you can't see it.


I'm not sure what you mean by writing the data to a table. If your form is bound to the table - ie has the table as the record source, your values will automatically be saved in the bound table.

Hi Again,

I have done as u said but there is a problem. The data is shown to screen only and it doesnot update the table. The combo box that i created COMBY, get data from second table, while the form itself has table1 as source. How do i connect both the tables. I am currently connecting table 1 codeno to table 2 code no.
please help

Darno
 

Users who are viewing this thread

Back
Top Bottom