Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Error Nos 29068

Status
Not open for further replies.

citychap26

Programmer
Sep 19, 2004
144
GB
Hi Guys,

I've had a look on the net and searched on here for an answer to the above error.

I believe that it has something to do with SP3 of Access2003.

I am trying to execute the following:

[code/]
Function FrmSave(sFrmName As String)

On Error GoTo ERR_HANDLER

If FrmIsLoaded(sFrmName) Then
DoCmd.Save acForm, sFrmName
DoCmd.Close acForm, sFrmName
End If

EXIT_FUNCTION:

Exit Function

ERR_HANDLER:

MsgBox Err.Number & ", " & Err.DESCRIPTION
Resume Next

End Function
Code:
Any ideas ? 

Cheers

SK
 
1. Give us the description of the error (as I have not memorized the description that goes with every error code number)
2. Post the code for the function FrmIsLoaded, as the error may be occurring there
3. I suspect you are expecting DoCmd.Save to save the data entry you made on the form. This is not what it does, it actually saves the design of your form

Joe Schwarz
Custom Software Developer
 

The description for 29068 is very generic

"Microsoft Access cannot complete this operation. You must stop the code and try again."

If you haven't installed the hotfix for SP3 you need to do that even if it isn't causing your problem.

As JoeAtWork has indicated, DoCmd.Save]/b] doesn't save data entered, but rather design changes made to an object, in this case a form.

We really need to see the code for FrmIsLoaded() as well as the code where you're trying to assign your form name to the function.

actually, two lines of code behind a button will do what you want:
Code:
DoCmd.RunCommand acCmdSaveRecord
DoCmd.close acForm, Me.Name

The Missinglinq

Richmond, Virginia

There's ALWAYS more than one way to skin a cat!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top