If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Unanswered: Autofilled fields on form dont record on table

Hi All,

Any assistance would be greatly appreciated!! (This is my first database by the way)

I need to fill in a form as easily as possible. Within this form are a number of fields which are required. Supplier details, Part details etc. On filling the Supplier name field my intention is to autofil the remaining suppliers detail fields. I have managed to do this some how!! (by bounding the boxes to the supplier name, drawing from a seperate table which contains all the supplier details). However when I go to the table which the form fills only the first combo box is recorded. Is there an easy way to resolve this or am I better starting again? (Or have I totally misunderstood how a database should work)

Check the Control Source of your form controls to see if they are bound to the correct fields, and make sure you have all the right fields included in the form's query. It should contain all the fields from the table the form is trying to populate, plus those non-key supplier table fields.

[QUOTE=StarTrekker]So the problem is that your form isn't filling in the right fields?

When I select the First filed on the form, say company name the form does fill in the the remaining fields Address line 1, 2, 3 etc. When I close and save the form and open the table that the form is feeding into only the company name appears and the remaining Address lines are empty. I need to generate a report from this table and the full address needs to be on it.

Is this any help?

When you say non-key supplier table fields, are these fields that are on the supplier table but are not needed on the form. These should also be included on the query?

it looks like you have accidentally done it right. why do you want to stuff a table full of n-duplicate data that already exists in a seperate table which contains all the supplier details ? (BTW there can be reasons to do this sometimes, but it is not everyday)

run your report off a JOIN query (can't say more without some knowledge of your tables and the report you are trying to run) that brings in the details where you need them.

[quote]why do you want to stuff a table full of n-duplicate data that already exists in a seperate table which contains all the supplier details ?

Thats what I thought, thats why I said at the end of the initial post - (Or have I totally misunderstood how a database should work).

I think I know what you mean, Im just over complicating things. If the form has just one field to fill, Supplier name, I can then run a query on the table linking the supplier name to the supplier table and bring the required information into the report that way?

I'll see what I can do by fudging my way through it (sort of worked so far and makes for a more interesting learning experience). If I have any problems I'll pst back on here.

There is 1 good reason for duplicating data in the main table - fast return on records (ie. it's much quicker returning xx million records without joining another table in the query). But again, only for LARGE recordsets and the need to do computations/returns quickly. Otherwise, it is usually frowned upon duplicating data in another table.

In regards to the issue of not writing to the table...
1. Make sure the field(s) on the form are bound to actual data fields (ie. not unbound - the fields have a controlsource.)
2. If unbound, you'll need to write code to update (or put the fields on the form somehow and update them.)
3. If the fields are bound, try issuing a "Refresh" command at some point after the company name is updated.

From the information above I've created 3 further tables that pull from these, these record the date and quantity of an incident/event. As all three tables require almost the same information I thought that this would be the best way to structure it. I will need to create further Tables using the above information too.

Table A - Problems found at the customer.
Table B - Problems created internally
Table C - Problems found internally, received from supplier. (The table i'm trying to get to grips with in this thread)

When I select the First filed on the form, say company name the form does fill in the the remaining fields Address line 1, 2, 3 etc. When I close and save the form and open the table that the form is feeding into only the company name appears and the remaining Address lines are empty.

Critical questions you need to answer here:

1. Which form are you creating?
2. Which table are you opening?

I need to generate a report from this table and the full address needs to be on it.

3. Which table?

I think your problem is directly related to this:

make sure you have all the right fields included in the form's query. It should contain all the fields from the table the form is trying to populate, plus those non-key supplier table fields.

You asked:

When you say non-key supplier table fields, are these fields that are on the supplier table but are not needed on the form. These should also be included on the query?

Non key fields are all the fields which are not "foreign keys" or "primary keys" of the supplier table. Yes, they need to be in the form's underlying query.