Taking figures from other table

  • Thread starter sys_analyst47 via AccessMonster.com
  • Start date
S

sys_analyst47 via AccessMonster.com

Dear All,

Just a quick query i have a table receiving which contains a serial no,
customer name, product, assigned to & branch.

Now in second table there are couple of more fields. I have a form designed
on both table what i want whatever i filled in table one on lost focus of
serial no i will get the info like cm name, product, assigned to.

i made a query which is taking the data from my 1st table & one change event
of the combo box on my form which is for serial number.

my code on change event Me!Cm_Name = Me!Serial_Number.Column(1)

when i mentioning column(2) or column(3) its not taking figures for other
fields can you please tell me what i am doing wrong & how can i rectify this.


Please define it completely. Appreciate your help
 
J

John W. Vinson

Dear All,

Just a quick query i have a table receiving which contains a serial no,
customer name, product, assigned to & branch.

Now in second table there are couple of more fields. I have a form designed
on both table what i want whatever i filled in table one on lost focus of
serial no i will get the info like cm name, product, assigned to.

i made a query which is taking the data from my 1st table & one change event
of the combo box on my form which is for serial number.

my code on change event Me!Cm_Name = Me!Serial_Number.Column(1)

when i mentioning column(2) or column(3) its not taking figures for other
fields can you please tell me what i am doing wrong & how can i rectify this.


Please define it completely. Appreciate your help

Are you trying to take the customer name, product, etc. from one table and
*store them* in a different table? If so, DON'T; you're missing the whole
point of relational databases, that you store information once, and once only,
and thereafter use Queries (and other tools such as combo boxes, DLookUps,
etc.) to reference the single entry. The customer name should exist in the
customer table *AND NOPLACE ELSE*.

Am I misunderstanding what you're trying to do?
 
S

sys_analyst47 via AccessMonster.com

John said:
Dear All,
[quoted text clipped - 14 lines]
Please define it completely. Appreciate your help

Are you trying to take the customer name, product, etc. from one table and
*store them* in a different table? If so, DON'T; you're missing the whole
point of relational databases, that you store information once, and once only,
and thereafter use Queries (and other tools such as combo boxes, DLookUps,
etc.) to reference the single entry. The customer name should exist in the
customer table *AND NOPLACE ELSE*.

Am I misunderstanding what you're trying to do?


Dear John,

I dont want to store information in customer table which has already been
entered against that serial number i just want a serial no should be on
another from just when a user changes that it will take the complete entry
made against that serial no. The issue i was facing is that i was only able
to fetch customer name rest fields were not picking, with the above mentioned
code.
 
J

John W. Vinson

I dont want to store information in customer table which has already been
entered against that serial number i just want a serial no should be on
another from just when a user changes that it will take the complete entry
made against that serial no. The issue i was facing is that i was only able
to fetch customer name rest fields were not picking, with the above mentioned
code.

If you just want to *display* other fields from the combo in textboxes on the
form, be sure that the fields you want to see are included in the combo box's
Row Source query, and that the ColumnCount property is equal to the number of
fields you want to include. Then set the Control Source of textboxes on the
form to

=comboboxname.Column(n)

where n is the zero-based index of the column you want to see.

No code is needed if you just want to see the data, only if you want to store
it.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top