Results 1 to 4 of 4
  1. #1
    StephenM is offline Novice
    Windows 11 Office 365
    Join Date
    Jul 2023
    Posts
    1

    How do I move a record from a file to a report? My report displays the 1st record each time.


    Imade a program using Microsoft Access. Ihave many records using the auto number ID. The second field in each record isa person's name. I made a form to loadthe database and I use a combo box to pull in the record I want. Problem, when I attempt to open a report, theinformation from the 1st record always populates it. I can easily change the record displayed onthe form, but always the first record pops up on the report. I know there is some way to have the currentrecord on the form pass over to the report, but I don't know how to make thishappen. Any help would be appreciated.

  2. #2
    Micron is online now Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,801
    Not much to go on there. What is the report recordsource? You would have to filter the report to whatever the autonumber id is for the current form record. Or maybe your other records are on subsequent report pages which you haven't noticed. I don't usually suggest this right at the beginning of a thread, but I suggest you copy/compact and zip your db and post here as I really think it would cut out a lot of back and forth questions. Look at the top of the forum page for "How to attach files" for help on that.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  3. #3
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    Control used to enter/select data to filter/search should be UNBOUND, otherwise you change data in record. Since you say that part works, I assume combobox is UNBOUND.

    Several ways to apply filter criteria for report. In your case, could be as simple as:

    DoCmd.OpenReport "your report name here", acViewPreview, , "ID = " & Me.ID

    For more info review http://allenbrowne.com/ser-62.html
    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.

  4. #4
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    4,940
    Quote Originally Posted by StephenM View Post
    Imade a program using Microsoft Access. Ihave many records using the auto number ID. The second field in each record isa person's name. I made a form to loadthe database and I use a combo box to pull in the record I want. Problem, when I attempt to open a report, theinformation from the 1st record always populates it. I can easily change the record displayed onthe form, but always the first record pops up on the report. I know there is some way to have the currentrecord on the form pass over to the report, but I don't know how to make thishappen. Any help would be appreciated.
    You do not 'move' records from a form to a report. Each looks at the records. How you tell it which ones to look at is up to you.
    In your situation, you would open the report with a filter, as June7 has advised.
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

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

Similar Threads

  1. Replies: 3
    Last Post: 02-06-2015, 01:18 PM
  2. Replies: 8
    Last Post: 12-29-2014, 08:13 AM
  3. Replies: 3
    Last Post: 12-11-2014, 11:26 AM
  4. Replies: 28
    Last Post: 05-25-2014, 04:01 PM
  5. Replies: 5
    Last Post: 06-16-2013, 05:25 PM

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