Results 1 to 2 of 2
  1. #1
    halt4814 is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jan 2012
    Posts
    19

    Filling in other textboxes with corresponding record data from query


    I have a query that selects records in a certain date range. Then I have a textbox that gets an input of the earliest date of that range... I used the code...

    =DMin("<field name>","<query name>")

    What I want to do is fill in other textboxes next to that one with the other fields' data for that corresponding record.

    So for example, the query runs and outputs the data and part number 2123 was ordered 10/2/2012, which happens to be the earliest in that particular date range. So the one textbook does work and outputs "10/2/2012"...Now I want another textbox right beside it to output "2123". Any suggestions?

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,771
    Maybe:

    =DLookup("partnumber", "queryname","datefield=#" & DMin("<field name>","<query name>") & "#")
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 5
    Last Post: 08-28-2012, 03:23 PM
  2. Problem filling textboxes from combobox
    By reidn in forum Forms
    Replies: 1
    Last Post: 06-23-2011, 05:06 PM
  3. Problemss filling textboxes from combobox
    By reidn in forum Programming
    Replies: 13
    Last Post: 06-23-2011, 01:48 PM
  4. Hide textboxes only on new record.
    By SRSA in forum Programming
    Replies: 2
    Last Post: 02-28-2011, 04:31 PM
  5. Replies: 3
    Last Post: 08-17-2010, 02:24 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums