Connecting Tech Pros Worldwide Help | Site Map

Duplicate Value error with Single Table across multiple tabs

 
LinkBack Thread Tools Search this Thread
  #1  
Old November 13th, 2005, 02:57 PM
Mark C via AccessMonster.com
Guest
 
Posts: n/a
Default Duplicate Value error with Single Table across multiple tabs

Ok bare with me on this one....

I have 1 table "Expenses" that holds about 50 fields broken down into sub
categories.

I have a Subform tied to a main form so that when I pull up a client it will
show all of that clients expenses divided out by the sub categories onto
seperate tabs. To view it everything is fine; however, when I want to enter
expenses for a new client I have an error.

The first tab of categories enters fine, and I can enter the 2nd tab, but
when I exit that tab I get a duplicates value error.

I have figured out what is happening, but can't get a fix yet. Because the
tabs are tied to the main form by the ID number and since we are just rolling
from tab to tab, the first one is not updating in the table and saving
properly. So when I enter the second one it is trying to create a new entry
for the same ID number causing a duplicates value.

I have tried to save the record with the docmd.save and I have tried to do a
refresh of the data with the DoCmd.DoMenuItem acFormBar, acRecordsMenu, 5, ,
acMenuVer70 command. The refresh only works if I do it on the main form;
however, I know my users will forget to go up and push a button. I want to
make it work with an on exit command or on update or something on the first
tab.

Sorry for the drawn out question but hope it gives the insight needed for a
helpful reply.

TIA for any help.


--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...ccess/200510/1

 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 220,840 network members.