How do I get information from table to form (Access)?

G

Guest

I am very new to Access. I was trying to enter data into a form and got an
error "Index or Primary Key cannot contain a null value." In order to avoid
that error, I entered the data directly into the table. Now the information
from the table does not show up on the form. I would like to try to make
that happen. Thanks for any help.
 
B

BruceM

Have you selected the table as the form's Record Source? Open the form open
in design view, then click View > Properties. Click the Data tab, and look
at the Row Source item. Once the table is selected you need to make sure
that controls (text boxes, check boxes, etc.) are bound to fields in the
table. Click the control, click View > Properties (or double click the
control, or single click it if the property sheet is already open), click
the Data tab, and check its Control Source.
You can also see the form's properties by double clicking the gray square
with the smaller black dot inside it at the top left where the rulers meet
(when you are in form design view). If the property sheet is already open,
just click the swuare once.
For the primary key, how have you established it? If it is autonumber (or
otherwise being assigned automatically) you don't need to do anything with
it when you create a new record; otherwise you need to fill it in.
 
R

Ron2006

It sounds as if you have as the record source for this form a table
that is a child table to a parent table. If that is true then you must
either open it as a subform related to the parent table subform or
supply the ID number of the parent somehow.

The other possibility is that you have a field of some type defined as
the Primary key but do not have that field on this form or do not have
it as the first field that has to be loaded with data.

Or you have multiple fields defined as primary keys, in which case you
have a problem because all of those fields have to be filled out at the
same time for you to create/save the record.

Ron
 

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