New Access 2007, cannot update records in Form

R

Rosalie

I installed Access 2007 on top of 2003 last weekend. I used it with one
database, in a data entry form with a subform, with no problems. But I have
another more important database, and when I try to update a record in the
data entry form (also with a subform), I'm not allowed to leave the record.
If I close the form, it says, "You can't save this record at this time.
XXXdatabase may have encountered an error while trying to save a record. If
you close this object now, the data changes you made will be lost."

I thought it might be because of the macro where the LastUpdate field is
set, and, sure enough, I had an error there in that I hadn't fully identified
the field; I fixed that error, and the field appears to update when I attempt
to leave the record, but I still can't leave the record and I lose my changes.

Any suggestions?
 
A

Allen Browne

What event are you using here?
Try the BeforeUpdate event procedure of the Form (not control.)
 
R

Rosalie

After I posted the question I researched the macro. I've never otherwise
used a macro, and I couldn't remember how it worked. It turns out the macro
was being activated by the form BeforeUpdate. This worked fine before I
"upgraded" to 2007. My interim solution was to disable the activation of the
macro in the form, but it means the loss of valuable information in the
records. I don't understand why I couldn't get it working, but, like I said,
I have hardly any experience with macros.
 
A

Allen Browne

Rosalie, I use code in the Form_BeforeUpate event procedure to record the
date/time of the update in every form I create. This works fine in A2007.

So, something else must be happening here. Presumably you are using SetValue
in a macro. Maybe that's not running correctly if your database is not in a
folder that is trusted. You may be able to address that by adding your
folder as a trusted location, under:
* Office Button (top left)
* Access Options (bottom of dialog)
* Trust Center (left)
* Trust Center Settings (button)
* Trusted Locations (left)
* Add new location (button)

For other general suggestions on upgrading to the new version, see:
Converting to Access 2007
at:
http://allenbrowne.com/Access2007.html
 
R

Rosalie

I've explored that avenue. As far as I can tell, the location is a trusted
one. I'll continue to pursue this. At least I can update the database.
Thank you, Allen, for your suggestions.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top