Prefill data on a form.

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a relationship database.

I need to add fields for entering Remarks on a form where entries are made for "Remarks", "Date Remarks Entered" and "Assigned Consultant".

I would like to be able to prefill fields by prompt from a query by using "Account Name" or "Policy Number" as these fields exist in tables of the database already and will be fields are ready available before remarks would need to be entered.

I have tried a form and am able to get one remark entered for a particular "Account Name" and fields do prefill but I can not get additional records created as all fields are blank and each entry needs to be a different record. I did create an autonumber field for the primary field of this "Remarks" table which is connected by Policy Number which is the primary key of the "Account Information" table which has the fields that I need to prefill.

Is there a way to do what I want by having fields prefill yet create new records in a table. If so, how does one do it?

I can supply more information if needed.
 
I did create an autonumber field for the primary field of this "Remarks"
table
which is connected by Policy Number which is the primary key
of the "Account Information" table

OOPS...there's your problem. The primary key of any table is always a unique
value. Thus, if you are joining the Remarks table to the Account Information
table on their common primary keys, then you will never be able to create
more than one Remark per Account. Instead, you need a structure something
like this.

tblAccountInformation
PolicyNumber (Primary Key)
....Other account related fields

tblRemarks
RemarkID (PrimaryKey)
PolicyNumber (ForeignKey -- use this field to join the tables)
Remark

--
Lynn Trapp
MS Access MVP
www.ltcomputerdesigns.com
Access Security: www.ltcomputerdesigns.com/Security.htm


bdehning said:
I have a relationship database.

I need to add fields for entering Remarks on a form where entries are made
for "Remarks", "Date Remarks Entered" and "Assigned Consultant".
I would like to be able to prefill fields by prompt from a query by using
"Account Name" or "Policy Number" as these fields exist in tables of the
database already and will be fields are ready available before remarks would
need to be entered.
I have tried a form and am able to get one remark entered for a particular
"Account Name" and fields do prefill but I can not get additional records
created as all fields are blank and each entry needs to be a different
record. I did create an autonumber field for the primary field of this
"Remarks" table which is connected by Policy Number which is the primary key
of the "Account Information" table which has the fields that I need to
prefill.
Is there a way to do what I want by having fields prefill yet create new
records in a table. If so, how does one do it?
 
Back
Top