Convert 97 to XP isn't working

T

Trisha

I recently converted a database from 97 to XP. There is
a form where we move sku's to another location in the
table (building a catalog). In 97, I used the code
DoCmd.RunCommand acCmdSaveRecord. Of course this line of
code no longer works in XP. If I take it out all
together, I don't receive the error message, but it also
doesn't save the changes of where you want the sku to
move. I looked this up and found that if you use
If Me.Dirty Then
DoCmd.RunCommand acCmdSaveRecord
End If
That should work. However, every time I get to the
docmd.runcommand acCmdSaveRecord line in the code I get
the same error I was: Error inserting: The command or
action "SaveRecord" isn't available now. Error #2046

Any help would be greatly appreciated. I'm to the point
now of having them put Access 97 back on their pc. I've
run out of ideas.

Thanks in advance,
Trisha
 
G

Guest

Trisha said:
I recently converted a database from 97 to XP. There is
a form where we move sku's to another location in the
table (building a catalog). In 97, I used the code
DoCmd.RunCommand acCmdSaveRecord. Of course this line of
code no longer works in XP. If I take it out all
together, I don't receive the error message, but it also
doesn't save the changes of where you want the sku to
move. I looked this up and found that if you use
If Me.Dirty Then
DoCmd.RunCommand acCmdSaveRecord
End If
That should work. However, every time I get to the
docmd.runcommand acCmdSaveRecord line in the code I get
the same error I was: Error inserting: The command or
action "SaveRecord" isn't available now. Error #2046

Any help would be greatly appreciated. I'm to the point
now of having them put Access 97 back on their pc. I've
run out of ideas.

Thanks in advance,
Trisha

It works for me using WinXP/ Acc2003. I copied your code and pasted it in
the OnClick event of a button. No error message and the record was saved.


You could also use

If Me.Dirty Then
Me.Dirty = False
End If
 

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

Similar Threads


Top