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 sizbut on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

problem with saving record

Status
Not open for further replies.

jahribba

Programmer
Jul 31, 2002
1
BE
hi...i've got an application in acces that has been written origanally for access97. Now we are migrating to Access2000 and i've got a problem. When i erase the line(with the star in front) everything works fine otherwise i get a fault message 2046, that deals about saving a record........anyone gots an idea............?
tnx.

Private Sub cmdNieuw_Click()

stDocName = "frmNieuwContactpersoon"

*DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70

DoCmd.OpenForm stDocName, , stLinkCriteria
End Sub
 
Hi,

I copied/pasted your code. It worked correctly. Is the recordsource of the form you are trying to save the record working correctly? It may have ambiguous joins preventing the save or sometimes the UniqueTable property has to be set to the table the record is to be saved.

Private Sub cmdNieuw_Click()

stDocName = "frmNieuwContactpersoon"

DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70

DoCmd.OpenForm stDocName, , stLinkCriteria
End Sub

Have a good one!
BK
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top