Results 1 to 3 of 3

Thread: Runtime error 94 : invalid use of null

  1. #1
    Join Date
    Mar 2012
    Posts
    1

    Runtime error 94 : invalid use of null

    When i run my form getnextorderno i get the following error : runtime error 94 invalid use of null.The code is below
    Function GetNextOrderNo()
    Dim nNextOrderNo As Double

    DoCmd.GoToControl "[NextOrderNo]"
    DoCmd.GoToRecord , , acNewRec



    SendKeys ("%{DOWN}")
    SendKeys ("{DOWN}")
    DoCmd.RunMacro ("Maint Order.SetNewOrderNo")

    nNextOrderNo = Val(Forms![Maint Order]![NextOrderNo].Column(0))


    Forms![Maint Order]![Order_No] = nNextOrderNo
    DoCmd.GoToControl "[Delivery_Date]"

    End Function

  2. #2
    Join Date
    Dec 2009
    Posts
    79
    What line of code gives you the error?

  3. #3
    Join Date
    May 2006
    Posts
    407
    And what is happening in this macro? "Maint Order.SetNewOrderNo"
    It would be real good to see that macro code.

Posting Permissions

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