microsoft access training class - primary key
The UK's Number 1 for Microsoft Office Training Add this page to your favourites/bookmarksBookmark page
 
View printable version of pagePrintable version
Plus One Google
Customer: Sign in
Delegate: Sign in
Trainer: Log in

Forum home » Delegate support and help forum » Microsoft Access Training and help » microsoft access training class - Primary key

microsoft access training class - Primary key

resolvedResolved · Low Priority · Version Standard

replyReply Thu 30 Aug 2007, 16:50Delegate David said...

David has attended:
Access Introduction course

Primary key

I have recently put a new client into the database. All ok.
Then I need to create a new form, with client details of monthly sales. As soon as I go to save I am told that the "Index or Primary key cannot contain a null value."
However I have put one in the database. It is a reference code made up of the clients name.
We have been using this system for quite awhile. It was originally set up by someone who has since left the company and the Primary key has been established with using the clients name as the code.
What am I doing wrong?
Any advice will greatfully received.

For upcoming training course dates see: Pricing & availability

replyReply Thu 13 Sep 2007, 15:50 Edited on Thu 13 Sep 2007, 15:50Trainer David said...

RE: Primary key

Hi David

As I cannot see your database, I do not exactly what the problem is. I would make sure that you are definately entering the primary key in the correct field and that the primary has not been used before.

Hope this helps
David

 

Access tip:

Create own ribbon tab - Access 2010

a. In Access click on the File tab
b. Select Options from left hand side
c. Choose the Customize Ribbon section
d. Click the New Tab button (below the list of tabs on the right hand side of the dialog box)
e. Select the New Tab (Custom) and enter a name, by clicking the Rename button (below the list of tabs on the right hand side of the dialog box)
f. Select the New Group (Custom) and enter a name, by clicking the Rename button (below the list of tabs on the right hand side of the dialog box)
g. Add commands to your tab and group by locating them on the list on the right hand side (remembering that you can change the list using the drop down box at the top of the list of commands) and clicking the Add button between the two panes to add them to your tab and group
h. You can rearrange the commands in your group, the groups on any tab or the tabs, using the up and down arrow buttons beside the list of tabs.
i. Click OK to apply your changes

View all Access hints and tips


Microsoft Certified Partner Accredited Training Provider: Institute of IT Training Institute of Leadership and Management - Certified Courses Security Seal verified by visa, mastercard securecard


Please tell us/web development about this error (copy and paste into an e-mail):
MySQL error: Duplicate entry '5' for key 'PRIMARY'
Line: 76
Actual SQL Query: insert into best_activevisitors (activevisitors_ID, activevisitors_IP, activevisitors_Time, activevisitors_Url) values (5, "38.107.179.240", now(), "/cms/forum.php")
Reported by: function sqlQueryBest()
When viewing (PHP_SELF): /cms/forum.php
Query string from URL: fpost_id=6243