Results 1 to 2 of 2
  1. #1
    Join Date
    May 2008

    Unanswered: Sub Form Not Open


    I am using the following code to enter a value if the inputter doesn't enter a value but when they do the code stops and says the sub form is not open am I missing something??

    Private Sub HIRE_RATE_I_Exit(Cancel As Integer)
    If Me.HIRE_RATE_I.Value <= 0 Then

    Me.HIRE_RATE_I.Value = Me.[HIRE RATE].Value

    End If

    If Me.HIRE_RATE_I.Value > 0 Then
    Me.HIRE_RATE_I.Value = Me.HIRE_RATE_I.Value

    End If
    DoCmd.GoToRecord acActiveDataObject, "qryProduct sub form", acNewRec

    End Sub

  2. #2
    Join Date
    Nov 2007
    Adelaide, South Australia
    I assume it's stopping on the "goto new record" line?

    TBH, I am not too sure how to navigate to the new (or any) record in a subform without changing its criteria. Perhaps I should leave this to one of the others...
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!

    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts