Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access
|
Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old April 7th, 2008, 07:54 AM
Authorized User
 
Join Date: May 2007
Posts: 85
Thanks: 0
Thanked 0 Times in 0 Posts
Default 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

exitop:
    Exit Sub

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

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.

 
Old April 7th, 2008, 08:44 AM
Authorized User
 
Join Date: May 2007
Posts: 85
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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






Similar Threads
Thread Thread Starter Forum Replies Last Post
append record whith do while function iisha64 Access VBA 0 February 19th, 2007 09:24 AM
Decimal place problem...ROUND function! kuku SQL Server 2000 9 July 9th, 2005 05:50 PM
Function to Find a Record me2357 Access VBA 5 March 10th, 2005 03:22 PM
Returning record in stored function with ADO nmbarbillo Oracle 0 June 15th, 2004 12:36 PM





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