By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,312 Members | 1,723 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,312 IT Pros & Developers. It's quick & easy.

Duplicate Value error with Single Table across multiple tabs

P: n/a
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
Nov 13 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.