p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   Access (http://p2p.wrox.com/forumdisplay.php?f=18)
-   -   new record function getting locked in place (http://p2p.wrox.com/showthread.php?t=67201)

jeremy1048 April 7th, 2008 07:54 AM

new record function getting locked in place
Hi folks,

I must have rebuilt this particular access 2000 database a dozen times now. For some reason I cannot fathom, the new record counter is regularly getting locked as on when the open form with link criteria is used.

The form has worked fine in the past and for weeks on end and then suddenly this crops up again.

This is the code that is currently there behind the open record button:

Private Sub btnopeninspect_Click()

    On Error GoTo errorhandler

    gstrcallingform = Me.Name
    btnclick = True

    Dim stDocName As String
    Dim stLinkCriteria As String

    stDocName = "frmfileinspect"

    stLinkCriteria = "[inspectid]=" & Me![txtinspectid]
    DoCmd.openform stDocName, , , stLinkCriteria

    Exit Sub

    generalerrorhandler Err.Number, Err.Description, fsmor, "btnopeninspect_click"
    Resume exitop

End Sub

As you can see nothing special. However when a break is put in and the path followed, for the checks for new record in form_load, it displays new record value is -1 and therefore follows through the rest of the path correctly.

My question is how the heck is this happening and how the heck do I stop it.

jeremy1048 April 7th, 2008 08:44 AM

This is a continuance of the issue MMC helped with back in October 2007. Same form same routine, different result.

All times are GMT -4. The time now is 05:46 AM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.