That error message indicates that at least one of the WorkOrders is for a
Customer that isn't in the Customer table.
One approach to resolve this issue would be to identify which CustomerIDs
are not in the WorkOrder table. Those are the ones you'll have to
reconstruct somehow.
I have a different concern, though.
How did the associate decide that the problem was with the code, and not
with the data?
Another concern ... a database name like "VJan2010" could be interpreted to
mean that databases are (re-)created for each year, or even for each month.
If that's the case, your associate has a ... spreadsheet, not a database!
It's a bit difficult to offer third-hand assistance ... so many things could
get lost in translation. Any chance your associate could post directly in
the groups?
Best of luck!
Regards
Jeff Boyce
Microsoft Access MVP
--
Disclaimer: This author may have received products and services mentioned
in this post. Mention and/or description of a product or service herein
does not constitute endorsement thereof.
Any code or pseudocode included in this post is offered "as is", with no
guarantee as to suitability.
You can thank the FTC of the USA for making this disclaimer
possible/necessary.
"Quattroped" <(E-Mail Removed)> wrote in message
news:7C111305-5F27-4FD0-9FF4-(E-Mail Removed)...
> Jeff,
>
> Here is the reply I got from my associate to my questions. Any help is
> appreciated.
>
> Greville,
>
> I don't think data is separate from application as both seem to load
> together, but I have no way of knowing for sure.
>
> It's Microsoft Access 2002.
>
> I was able to make a copy of the database (in which the programs were
> working ok) & called it VJan2010. Then I went into Vjan2010 and delated
> all
> data in the tables.
>
> Then I went in to the current version (the one we've been using but with
> program bug) and started copying tables & pasting them to Vjan2010.
>
> It let me paste the Customer table, then the Employees table but when I
> tried to paste the Workorders table it stopped me saying: "You cannot add
> or
> change a record because a related record is required in table 'Customer'.
> A
> similar message occurred when I tried to paste the Database table.
>
> Don't know what else to do.
>
>
>
>
> Gerry,
>
> I have had a response to my inquiry, but with more questions than answers.
> Do you happen to know whether or not the application and the data are
> "split"? That is to say that the data exists outside the application and
> is
> re-loaded on startup.
>
> What version of Access are you running?
>
>
> Hi Greville
>
>
> I did locate a backup copy of the Time Recording System and the programs
> work but the data in the database is old. If I could just figure out how
> to
> attach the new database files to those programs, we may be okay.
>
>
|