Index or primary key cannot contain null values

Index or primary key cannot contain null values

Post by Dan » Sat, 17 Jul 2004 00:30:19


When the primary key is null and a record is being
inserted I get this error: "Index or primary key cannot
contain null values"

I just want to change what the message says but I can't
seem to get any message boxes to pop up when it occures.

This is my code:
If Err.Number = 3058 Then
MsgBox "..."
End If

when should I run my code and should that work
 
 
 

Index or primary key cannot contain null values

Post by Wayne Morg » Sat, 17 Jul 2004 00:39:35

This would probably be handled in the form's Error event.

--
Wayne Morgan
Microsoft Access MVP