Multiple Tab Form

Soft Macro

New member
Local time
Today, 05:15
Joined
Jul 9, 2007
Messages
8
Hi there,

I am a starter. I need some help with ACCESS forms! :confused:

I have a form with 9 tabs. All the data in this form are from the same table (so there is no table linking).

Every time when i tried to enter data, the first tab works fine. However, the second tab tells me "Index or Primary hey can not contain a null value". I only have one primary key "ID" sitting in my first tab.

I tried to put "ID" in top header to make sure that those 9 tabs share the same ID so that all the data can go into the same row in my table. But it failed.

Could someone please help me?

By the way, i set up all veriables' "source object" to the same table.

Many thanks,
S
 
What are you using for a primary key? If you were using an autonumber it would work just fine and you can put it anywhere on the form because a tab control is nothing more than a visual illusion. It isn't referenced anywhere and it just hides things and displays things based on which tab is selected.
 
Thanks boblarson for quick reply! unfortunately, I do need ID for my primary key. They are unique and identifying each record...
 
Thanks boblarson for quick reply! unfortunately, I do need ID for my primary key. They are unique and identifying each record...

Actually, I'm going to shock you with the statement - No you don't. You can use an autonumber for your primary key but still have another ID field that is set to Indexed (No Duplicates) so that it can ensure that you have a unique number.

But, that is another whole lesson in db construction. Anyway, to solve your problem you will have to have the key field in an open spot in the details section of the form (not necessarily the header) where it can be filled out before going to any tabs.
 

Users who are viewing this thread

Back
Top Bottom