Results 1 to 4 of 4
  1. #1
    Mike4172 is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jul 2012
    Posts
    17

    Grabbing Data from Query Onto Form


    So I have a query where I can grab the data using Dlookup() but it only returns first record. Sometimes I have more than one record. I'd like to add a NEXT button to display the next record when clicked if it exists. Any help would be appreciated.

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,967
    Why does query result in only one record?

    Is the query used as RecordSource for a form?

    Could use intrinsic record navigation bar. If you want custom buttons for 'previous' and 'next', try the design wizard for creating buttons.
    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.

  3. #3
    Mike4172 is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jul 2012
    Posts
    17
    Well I have a seach portion to form. Users enter in last name and birthdate and when the text boxes match the query I've set up, I grab the customer ID, set the current record with the after update. Currently I added a button to display all matches from query in query mode. But would prefer a way which I can: count number of results in query (dcount), grab data from second row (if there is say two matches)

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,967
    Why the second (or last) row?

    Maybe just set the sort order to Descending?
    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. Form with data from a query and a table
    By dpasanen in forum Forms
    Replies: 3
    Last Post: 03-05-2012, 10:09 AM
  2. Replies: 9
    Last Post: 09-20-2011, 07:47 PM
  3. Replies: 9
    Last Post: 04-27-2011, 05:04 PM
  4. Use of form to gather data for a query
    By tarhim47 in forum Forms
    Replies: 10
    Last Post: 11-05-2010, 10:46 AM
  5. Use form data in a query
    By Zholt in forum Forms
    Replies: 2
    Last Post: 05-13-2009, 07:59 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