473,378 Members | 1,364 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

Changing "Index or Primary Key cannot contain a null value" message

Hi everyone,

I have a form with several fields. One represents the primary key. If you
leave it blank and try to save the record, the forms displays the following
error message - "Index or Primary Key cannot contain a null value". I
understand why it is doing this, but I'm wondering if I can program a
friendlier message. Any help would be great.

Many Thanks!
Nov 12 '05 #1
1 7693
TC
Check out the Form_Error event.

HTH,
TC
"JBrow" <j@jdp.coj> wrote in message
news:5Hgpb.65196$mZ5.390750@attbi_s54...
Hi everyone,

I have a form with several fields. One represents the primary key. If you leave it blank and try to save the record, the forms displays the following error message - "Index or Primary Key cannot contain a null value". I
understand why it is doing this, but I'm wondering if I can program a
friendlier message. Any help would be great.

Many Thanks!

Nov 12 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: DraguVaso | last post by:
Hi, Something I don't understand about a Typed DataSet: When a value in the DataSet is DBNull, it throws this error: "Cannot get value because it is DBNull". But aren't Typed DataSets...
13
by: Don Vaillancourt | last post by:
What's going on with Javascript. At the beginning there was the "undefined" value which represented an object which really didn't exist then came the null keyword. But yesterday I stumbled...
10
by: Daniel | last post by:
how to make two references to one string that stay refered to the same string reguardless of the changing value in the string?
4
by: hao | last post by:
Hi, all When I use ASP to insert an record to a database, I got some errors and can not insert any value with Chinese Char. The only way I can do that is use "rst1.Addnew...rst1.update". Anyone...
9
by: D. Shane Fowlkes | last post by:
I'm using SQL Server 2000 and on my page, I'm simply creating a SQLDataReader and filling in Labels with the retrieved (single) record. However, how can I prevent from getting errors when a field...
4
by: Antoine | last post by:
Herfried and Cor:- I used tracing and actually tracked down the code that was causing the problem most likely. I wonder if you wanted to comment on it. Also I wonder if there is a better way...
9
by: Igor Okulist | last post by:
int func(void**); { short* p = NULL; func(&p); //<<< here } Could somebody remind me why is this not allowed ? error message: "cannot convert parameter from 'short **' to 'void **'"
6
by: marcwentink | last post by:
Dear Sirs, Dear Newsgroup, Imagine I have some function that only gives me an iterator to a vector, but not the vector itself. Unfortunately this vector can be empty and the iterator can point...
5
by: Pseudonyme | last post by:
Dear All : Ever had an httpd error_log bigger than the httpd access log ? We are using Linux-Apache-Fedora-Httpd 2006 configuration. The PHP lines code that lead too tons of errors are : ...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.