Results 1 to 2 of 2
  1. #1
    3 Star Lounger
    Join Date
    Jan 2001
    Posts
    254
    Thanks
    0
    Thanked 0 Times in 0 Posts

    DLookup (Access 2000)

    In my report i have a control source with DLookup that is all right.However, when i try to put it as code in the OnOpen event of the
    report,i receive the mseeage that you have entered an expression that has no value
    Me![TxtQuantityOutput].RecordSource = DLookup("Quantity", "qryBlOutput", "ProductID = " & [Productid])


    What may be the reason ?

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: DLookup (Access 2000)

    Put it in the On Load event instead of in the On Open event. On Open occurs before the first records has been loaded, so ProductID is not known yet. On Load occurs when the first record is loaded.

Posting Permissions

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