Results 1 to 6 of 6
  1. #1
    abakhaus is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Dec 2016
    Posts
    9

    Help with Buttons opening the correct report

    I was tasked with revamping my companies Access Data base for part specs. I am having an issue figuring out how to make it all gel together. Below is how I would like it to function.


    A Form for Each Customer. Customer ID will be the only unique field for each Customer form. Each Customer form will have the same 6 buttons.

    When a button is clicked I would like to spit out a report based on the Customer ID that is on that form and the button Caption.

    For Example Customer A Form is open. Button 1(Name) is clicked. Report is opened from the main table with only data for Customer A and Button 1 (Name)

    I appreciate any help you can give.

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,524
    You don't need all those forms. 1 customer form can show all the customers or 1 customer.
    otherwise you need to program N forms.
    and how many report buttons does 1 form have? Just 1?
    but
    to report on the shown record, on button click,
    Docmd.openreport "myReport",acViewPreview,,"[id]=" & txtBoxID

  3. #3
    abakhaus is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Dec 2016
    Posts
    9
    Thanks! Appreciate the help. Can you tell me what Combo box field stores the value that is selected from the drop down? Trying to use the criteria in a Query and I can't get it to work.

  4. #4
    abakhaus is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Dec 2016
    Posts
    9
    In my Criteria Box in the Query I have [Forms]![Cookbook]![CPNPCombo] However it isnt pulling the combobox value to fill in the query. Please help.

  5. #5
    ssanfu is offline Master of Nothing
    Windows XP Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    You could post your dB for analysis..... (do a "Compact & Repair", then Zip it)

  6. #6
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,524
    The query would pull all customers by name,with the ID hidden in the 1st column.
    user picks by name,but the comb stores the ID.

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

Similar Threads

  1. Report not pulling correct record
    By jlo33jenn in forum Reports
    Replies: 6
    Last Post: 06-25-2015, 09:14 AM
  2. Replies: 5
    Last Post: 09-12-2014, 06:41 AM
  3. Replies: 9
    Last Post: 06-26-2011, 09:14 PM
  4. Form Not Opening Correct Record
    By halfaguava in forum Forms
    Replies: 1
    Last Post: 06-09-2011, 07:00 PM
  5. Opening form to correct record. Bookmark?
    By stephenaa5 in forum Forms
    Replies: 11
    Last Post: 12-29-2009, 02:43 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