Results 1 to 5 of 5
  1. #1
    2 Star Lounger
    Join Date
    May 2005
    Posts
    180
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Reference a query record (2003)

    Is there a way to reference a particular record in a query. For example, for different instances of the same query (different form generated criteria), can the 3rd or 6th record be referenced. I want to be able to refer to the record in a Dlookup field. ***Correction record in a 'query'

    nebbia

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

    Re: Reference a query record (2003)

    You may be able to use a combination of Min/Max and a nested Top n query, but you'll need to provide more details.

  3. #3
    2 Star Lounger
    Join Date
    May 2005
    Posts
    180
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Reference a query record (2003)

    Edited by HansV to provide link to post - I only had to place square brackets [ ] around the text.

    This is a continuation of <post:=616,839>post 616,839</post:>. The photo array works satisfactorily. I would now like to attach a name to each photo. I thought that if a could reference the query behind the form that the name information could be accessed and added to the form.

    nebbia

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

    Re: Reference a query record (2003)

    The code behind the form already loops through the records of the query. You can easily add code to the loop to set the caption of a label.
    In the attached version, I added labels lbl1 to lbl12, and added code to set their captions. Only two extra lines of code were needed.

  5. #5
    2 Star Lounger
    Join Date
    May 2005
    Posts
    180
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Reference a query record (2003)

    You often make it seem so easy. I can't play with it too much but I'm sure it will work perfectly

    Thanks

    nebbia

Posting Permissions

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