Results 1 to 3 of 3
  1. #1
    landog is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Oct 2012
    Posts
    2

    load and next buttons

    I have a "load" button whose event opens a database connection, populates a recordset with a database query and loads the first record into various textboxes.



    I would like a "next" button to get subsequent records.

    But the recordset from the load button is not in scope of the subroutine associated with the event code of the "next" button.

    How best to get the two subroutines to operate on the same set of data?

    How would each selection of the "next" button know where the previous one had left off?


    Thanks,
    -dog

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,598
    Why are you using unbound form and code to populate form?

    Try:
    Declare a public recordset variable in module header. Set the variable in the 'load' button code.
    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
    landog is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Oct 2012
    Posts
    2
    6-7: Thank you!

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

Similar Threads

  1. Replies: 10
    Last Post: 09-18-2012, 02:00 PM
  2. Northwind - how to load
    By KHill in forum Access
    Replies: 4
    Last Post: 07-10-2012, 07:37 PM
  3. Query on start up / load
    By KEVWB in forum Access
    Replies: 11
    Last Post: 01-31-2011, 04:42 PM
  4. Load SQL results into an array
    By Tyork in forum Programming
    Replies: 8
    Last Post: 01-24-2011, 01:58 PM
  5. Program to load data
    By fsmikwen in forum Access
    Replies: 2
    Last Post: 12-10-2009, 08:36 AM

Tags for this Thread

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