Save Record does not work.

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I get this message, The command or action "Save Record" isn't available now.,
when I try to run the following sub. I have the same version of access
(2000) on two machines and the sub runs on one but not the other. The one
that I get the error message on is networked to the back end db on another
machine. The one that works has the db backend on it. What am I doing wrong?

-------start code---------------
Private Sub CopyBWAdd_Click()
On Error GoTo Err_CopyBWAdd_Click
If IsNull(Me![ClientID]) Then
MsgBox "Enter client information before adding copies."
Else
Dim stDocName As String
Dim stLinkCriteria As String

stDocName = "CopyBWAdd"

DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
stLinkCriteria = "[fldClientID]=" & "'" & Me.ClientID & "'"
DoCmd.OpenForm stDocName, , , stLinkCriteria
End If

Exit_CopyBWAdd_Click:
Exit Sub

Err_CopyBWAdd_Click:
MsgBox Err.Description
Resume Exit_CopyBWAdd_Click
End Sub
------end code---------
 
Presumably the CopyBWAdd button is on a bound form?

If it works on one machine but not on another, then there has to be a
difference in service packs, or a corruption of the different copies of the
file. In the Windows Explorer, locate the file msaccess.exe - typically in:
C:\Program Files\Microsoft Office\Office
Right-click it, and choose Properties.
If you have SP3 applied, you should see this on the Version tab:
9.0.0.6620
If either computer has a lower number, download SP3 for Office 2000 from:
http://support.microsoft.com/kb/276367

Next, locate msjet40.dll - typically in:
C:\Windows\System32.
Right-click, and see if the version looks like this:
4.0.8xxx.0
If the minor version does not start with 8, download SP8 for JET 4 from:
http://support.microsoft.com/kb/239114


If all that checks out correctly on both machines, it is possible the file
is corrupt. Post back for more info.

In place of the DoMenuItem line, you could try:
If Me.Dirty Then Me.Dirty = False
or perhaps:
RunCommand acCmdSaveRecord
 
Back
Top