table update

  • Thread starter Thread starter D.J.Wellhouse
  • Start date Start date
D

D.J.Wellhouse

First and most important I am very new to Access (first project)
I am using access 2kI have created a frm based on a multiple tbl qry
all are bound. on the frm I have 6 fields 5 of which are making the
6th using the control source to concatenate the others together into a
14 char text sting I want this to become the primary key for the
table. When I finish entering the data in the form and press the save
button I'm getting a message that says primary key can not be nul.
The table is not updating with what I am seeing on the screen. Is this
update something I need to do with an after_update exp or the like. If
so how please. You may ask why not just enter the 14 char string and
be done with it. The answer is those people entering the data (big
finger effect)
 
A primary key is set at the table level not the form level.
From what I am reading and the fact that you are new to Access, I would
suggest reading up on these subjects first: Normalization, Referential
Integrity, Database Relationships. These topics can be searched via the
Internet. I would also suggest buying a book on Access; such as the Access
2000 Bible.

A query that is used against a form should only be based on one table not
multiple tables. If you use multiple tables in the query you run the risk of
the form not being updateable.
 
I,m not trying to set the primary key from the form just get the info
from the form to update the field in the table. I have a table with a
field that matches each field in the form. The other fields in the
table update as I input data into the form. The problem is the one I
create when I put the others together. The only thing different is
that I use the control source in this text box (on the form) to get
the information from the other five. If I get rid of the control
source code I've put in it works. What I've done is put the line =[a]
& ..etc (for the control source for [f]) to get [f] to read those
fields concatenated together on the form. I see the result on the form
but it is not updating the related field on the table.
 
Back
Top