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

    Unanswered: Unable to move to new record

    Afternoon guys

    I have written the following code to run on exiting a text box it either keeps the inputted price or replces it with the current one if higher. It works up to a point but then won't let you move on to a new record have I missed something?

    Private Sub COST_Exit(Cancel As Integer)

    If Me.COST.Value <= Me.COST&#163;.Value Then
    Me.COST.Value = Me.COST&#163;.Value
    End If

    If Me.COST.Value > Me.COST&#163;.Value Then
    Me.COST&#163;.Value = Me.COST.Value
    End If

    End Sub
    Last edited by aradford; 09-03-08 at 08:45.

  2. #2
    Join Date
    Nov 2007
    Adelaide, South Australia
    I see nothing related to a new record, so without any further details all I can say is that yes, you have missed providing us enough information to help you!

    You might want to try using After Update instead of Exit, but I am only guessing at this point. The code looks OK, although, I'd lose the equal sign in the first test.
    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