Index and Primary Key cannot contain a Null value

  • Thread starter Musa via AccessMonster.com
  • Start date
M

Musa via AccessMonster.com

I have one table with PK ID. There are two forms that share the information
of this table. I have a macro that closes the first form and opens the
second on the same PK ID. At the end of the second form I have a macro that
closes and brings the user to a new record at the top of the first form.
There are no error messages after entering the first form, but when I try
adding another record I get " Index or Primary Key cannot contain a Null
value. Somewhere the form is not recognizing the Save in the macros....
 
J

John W. Vinson

I have one table with PK ID. There are two forms that share the information
of this table. I have a macro that closes the first form and opens the
second on the same PK ID. At the end of the second form I have a macro that
closes and brings the user to a new record at the top of the first form.
There are no error messages after entering the first form, but when I try
adding another record I get " Index or Primary Key cannot contain a Null
value. Somewhere the form is not recognizing the Save in the macros....

There are two flavors of Save: one saves *design changes to the structure of
the form*, and the other - SaveRecord - saves the value in the current record.
My guess is that you have the wrong one.
 

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