Results 1 to 10 of 10
  1. #1
    Quercus is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Feb 2014
    Location
    Illinois
    Posts
    5

    Form dislays wrong record.

    Good day. I have been using Access to track a collection for many years. This is a simple single table with 18 columns containing information such as date, cost, color, appearance etc. The first column is an auto number field. I have not written any code. And, since this is a one time effort, would prefer not to.
    Recently I have created several small forms which when printed become labels for the collection.
    I open the table, locate the record number I want to print, open the form, and enter the desired record number in the box bottom left.
    My problem is that the form displays the wrong record; usually 2 or 3 below the one I want. I think I may have created the error. I am very familiar with Excel and used the same method to delete in Access. Highlight the row and hit the delete button.


    How can I make the form show the correct record please? Do I need to delete the form and recreate or export the data in CSV format and re-import? Or is there a simple fix?

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,626
    The record number in the navigation bar does not necessarily correspond to the ID number in the record. It merely indicates position in the form's recordset. If the form is filtered so only 5 out of 100 records show, the ID numbers in the records might be 2, 6, 17, 44, 62 but the navigation window will still show 1, 2, 3, 4, 5. If your ID field has gaps in sequence (which is common with autonumber field), the correspondence will fail at the first gap.

    Other options:

    1. intrinsic search/filter tools. Right click in any data control to open the shortcut filter/sort menu, or click the tools on the ribbon

    2. code (macro or VBA)
    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
    Quercus is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Feb 2014
    Location
    Illinois
    Posts
    5
    Thank you. May I clarify. I am not using the auto number to find the record of interest. From the table I note record number, bottom left which might read 'Record: 500 of 900'. Then open the form and go to the similar place, bottom left where I enter "Record 500".

  4. #4
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,626
    Does the form show the same number of records or is there a filter applied? Also can't always rely on the sort order of records unless it is explicitly set the same in both objects.
    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.

  5. #5
    Quercus is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Feb 2014
    Location
    Illinois
    Posts
    5
    Both the table and form show the same number of records, 877. There are no filters applied, but to make sure I cleared them in the table. The table is sorted by date. I don't know how to tell the form to also sort by date. Advice please.
    Martin

  6. #6
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,626
    The form has a Sort By property. Or base the form RecordSource on a query or an SQL statement that has sort criteria.
    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.

  7. #7
    Quercus is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Feb 2014
    Location
    Illinois
    Posts
    5
    If I add, delete or edit a record, then open a form; the form shows the wrong record. If I save, close and re-open the file, the form shows the correct record.
    M

  8. #8
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,626
    You are attempting a procedure I've never used nor seen anyone try but I just did a quick test and it works. If you want to provide db for analysis, follow instructions at bottom of my post.
    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.

  9. #9
    Quercus is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Feb 2014
    Location
    Illinois
    Posts
    5
    dB Uploaded for examination. Filename "New Issues Zip".

  10. #10
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,626
    You have to attach file to post.
    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: 4
    Last Post: 07-03-2013, 10:02 AM
  2. Can not refresh a form - what am I doing wrong?
    By RedGoneWILD in forum Forms
    Replies: 9
    Last Post: 06-26-2012, 04:53 PM
  3. Replies: 7
    Last Post: 05-01-2012, 11:43 AM
  4. Replies: 2
    Last Post: 04-10-2012, 12:30 AM
  5. Updating field goes to wrong record
    By chrismalan in forum Forms
    Replies: 7
    Last Post: 03-20-2011, 08:07 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