A strange error

D

Dwayne Conyers

We have a form tied to a table in our database. When creating a new record,
we get an error that says:

"Index or primary key cannot contain a null value"

The form has the primary key (ID) field in a hidden/invisible textbox since
that field is an autonumber. Not sure why we are getting this error.
We've built other forms the same way...
 
L

Larry

-----Original Message-----
We have a form tied to a table in our database. When creating a new record,
we get an error that says:

"Index or primary key cannot contain a null value"

The form has the primary key (ID) field in a hidden/invisible textbox since
that field is an autonumber. Not sure why we are getting this error.
We've built other forms the same way...

--
dwacon
www.dwacon.com


.
unhide the autonumber field and make it visable
you can still hide it by making tabstop to no and placing
it under another textbox
 
A

Alick [MSFT]

Hi Dwayne,

If you create a fresh new form based on the same table, does the issue
occur? If you open the table and add the record directly, the problem
occurs?

Otherwise, would you please post the table structure?


Sincerely,

Alick Ye, MCSD
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

--------------------
|
| We have a form tied to a table in our database. When creating a new
record,
| we get an error that says:
|
| "Index or primary key cannot contain a null value"
|
| The form has the primary key (ID) field in a hidden/invisible textbox
since
| that field is an autonumber. Not sure why we are getting this error.
| We've built other forms the same way...
|
| --
| dwacon
| www.dwacon.com
|
|
|
 
D

Dwayne Conyers

Looks like we found the probolem... the ID was wrong data type, should have
been Autonumber.

d.c.
 
A

Alick [MSFT]

Hi Dwayne,

Glad to hear you have found the cause :- )


Sincerely,

Alick Ye, MCSD
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

--------------------
| Reply-To: "Dwayne Conyers" <[email protected]>
| X-Tomcat-NG: microsoft.public.access.forms
|
| Looks like we found the probolem... the ID was wrong data type, should
have
| been Autonumber.
|
| d.c.
|
|
| | > Hi Dwayne,
| >
| > If you create a fresh new form based on the same table, does the issue
| > occur? If you open the table and add the record directly, the problem
| > occurs?
| >
| > Otherwise, would you please post the table structure?
| >
| >
| > Sincerely,
| >
| > Alick Ye, MCSD
| > Microsoft Online Partner Support
| >
| > Get Secure! - www.microsoft.com/security
| > This posting is provided "as is" with no warranties and confers no
rights.
| >
| > --------------------
| > |
| > | We have a form tied to a table in our database. When creating a new
| > record,
| > | we get an error that says:
| > |
| > | "Index or primary key cannot contain a null value"
| > |
| > | The form has the primary key (ID) field in a hidden/invisible textbox
| > since
| > | that field is an autonumber. Not sure why we are getting this error.
| > | We've built other forms the same way...
| > |
| > | --
| > | dwacon
| > | www.dwacon.com
| > |
| > |
| > |
| >
|
|
|
 

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