473,406 Members | 2,619 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Beginner: Mde error- couldn't make changes

I have a database mdb. that I've made a mde. file out of. When I try
to run the file I get a can't make changes requested, would create
duplicate values error.
Now for the facts: The open event on the form that produces the error
supplies a new number to a primary key field by looking at the highest
exsisting number in that field and incrementing by 1, similar to the
way an autonumber would work. The code finds the record with the
highest number,selects, copies, then paste appends it to a new record,
it then increments the number by one so as not to create a duplicate
value. I have search this forum and found some info on the subject but
no answers it is my understanding from these posts (see below) that
access strips away any code written in the form to make the mde. Is
there a work around? If so could someone explain it to me? Thank you.
Following is a thread from my search.
"Making an MDE file will not do anything to a table...it simple
compiles and "strips-out" the source VBA code behind the forms. If
you look at an MDE
database you will see the tables are quite unchanged. MDE files make
great
front-ends for MDB backends. Making an MDE as a container for a bunch
of tables
would serve no purpose."
Nov 12 '05 #1
1 1517
DFS

"bbrazeau" <bb******@adelphia.net> wrote in message
news:90**************************@posting.google.c om...
I have a database mdb. that I've made a mde. file out of. When I try
to run the file I get a can't make changes requested, would create
duplicate values error.
Now for the facts: The open event on the form that produces the error
supplies a new number to a primary key field by looking at the highest
exsisting number in that field and incrementing by 1, similar to the
way an autonumber would work. The code finds the record with the
highest number,selects, copies, then paste appends it to a new record,
it then increments the number by one so as not to create a duplicate
value.
bbrazeau,

At the point you do the Paste | Append you are trying to create a duplicate
value in the primary key field. That's what's causing the dupe error.

You have to do the Paste | Append with the ID value already incremented by
1. Here's one way to do it:

INSERT INTO TABLE (IDField, Field2, Field3, ...)
SELECT (DMax("IDField","TABLE") + 1) AS NewID, '" & Field2 & "', " & Field3
& ",...
FROM TABLE
WHERE IDField = DMax("IDField","TABLE")




I have search this forum and found some info on the subject but no answers it is my understanding from these posts (see below) that
access strips away any code written in the form to make the mde. Is
there a work around? If so could someone explain it to me? Thank you.
Following is a thread from my search.
"Making an MDE file will not do anything to a table...it simple
compiles and "strips-out" the source VBA code behind the forms. If
you look at an MDE
database you will see the tables are quite unchanged. MDE files make
great
front-ends for MDB backends. Making an MDE as a container for a bunch
of tables
would serve no purpose."

Nov 12 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

16
by: Rod Carrol | last post by:
Hello all, As a beginner I've been exeperiencing lots of errors while building my website, (I'm currently attempting to implement a member login/registration piece for my site using mySQL and...
15
by: PhilB | last post by:
Hello experts, I am a complete beginner in C++ (although I know C). I am trying to compile the code below, and I get the following error. Can anyone explain to me my mistake? Thanks! PhilB ...
8
by: Grrrbau | last post by:
I'm a beginner. I'm looking for a good C++ book. Someone told me about Lafore's "Object-Oriented Programming in C++". What do you think? Grrrbau
8
by: Bshealey786 | last post by:
Okay im doing my final project for my first computer science class(its my major, so it will be my first of many), but anyway im a beginner so im not to great with C++ yet. Anyway this is the error...
1
by: Mike Malter | last post by:
I am just starting to work with reflection and I want to create a log that saves relevant information if a method call fails so I can call that method again later using reflection. I am...
33
by: aaron | last post by:
I have a question in my class.. hoping to get some help I need to create a program that will print firstName middleName lastName then their initials User will input: John Smith Doe Output:...
4
by: subramanian100in | last post by:
In the book, C++ Coding Standards book by Hereb Sutter and Andrei Alexandrescu, in Item 40 on pages 86-87 viz, "Avoid providing implicit conversions", the authors have advised the use of named...
0
by: Daniel T. | last post by:
Carter <cartercheng@gmail.comwrote: When you see "discards qualifiers", more often than not, it means that a const object is begin asked to do something that only non-const objects can do....
2
by: malcster2 | last post by:
hello, i am a beginner to ajax. i have created a mysql database, which i would like to access from a web page. i have created 3 files, a html to display the data, a php file to extract the data,...
22
by: ddg_linux | last post by:
I have been reading about and doing a lot of php code examples from books but now I find myself wanting to do something practical with some of the skills that I have learned. I am a beginner php...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.