Results 1 to 7 of 7
  1. #1
    TwoDodges is offline Novice
    Windows 10 Access 2016
    Join Date
    Jan 2018
    Posts
    7

    Ccombo box selection in report

    I have a report that shows member contact information and lists certain details for each member in main body.
    At the moment the report defaults to print preview and has record selectors a bottom.



    Can I put a combo box for record selection overlaying the report to enable select record to print ( select by surname / memb ID ) ..???
    ... all attempts to do so / find out -- no avail

  2. #2
    Minty is offline VIP
    Windows 10 Office 365
    Join Date
    Sep 2017
    Location
    UK - Wiltshire
    Posts
    3,003
    Reports aren't really the place for this, I would do it in a form that then opened a restricted record source for the report.

    Report data is effectively static, ready to print. Changing it dynamically, whilst possible, means re-rendering the entire report, which could be quite slow.
    DLookup Syntax and others http://access.mvps.org/access/general/gen0018.htm
    Please use the star below the post to say thanks if we have helped !
    ↓↓ It's down here ↓↓

  3. #3
    TwoDodges is offline Novice
    Windows 10 Access 2016
    Join Date
    Jan 2018
    Posts
    7
    OK ... I have placed a button on my form to open the reportand have created query that displays data for report, but I can not get the button to pass the required field data [ Members_MembID ]to the query.
    It brings up a window asking me to input value into that field.
    If I do it then gives me the report... I assume I have got the incorrect syntax for the query ... = form name/field name ( [Form]![Members_Vehicles]![Members_MemID] )
    Help GREATLY appreciated ..!!

  4. #4
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    4,940
    Show the query sql
    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

  5. #5
    TwoDodges is offline Novice
    Windows 10 Access 2016
    Join Date
    Jan 2018
    Posts
    7
    I have removed some of the fields to abreviate ..
    This is from the query that runs the report .....
    the form the ID number that is passed to the query is 'Members_Vehicles' and field is 'Members_MembID'

    SELECT Members.MemberID, Members.Surname, Members.Firstname,
    ….. + other fields
    FROM Members RIGHT JOIN autolist ON Members.MemberID = autolist.MemberID
    WHERE (((Members.MemberID)=[Form]![Members_Vehicles]![Members_MemID]))
    ORDER BY Members.Surname;

  6. #6
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    4,940
    I cannot see anything wrong with that, BUT if access is asking for a value, it cannot find it?
    Check your names.

    In fact, if I use the builder for the sql, it is [Forms]![Members_Vehicles]![Members_MemID]
    So when it doubt, use the Builder to get the correct syntax.

    I rarely tied queries to form controls, so not familiar with the syntax, but then, I'd google for it, to make sure
    Last edited by Welshgasman; 02-22-2022 at 07:55 AM.
    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

  7. #7
    TwoDodges is offline Novice
    Windows 10 Access 2016
    Join Date
    Jan 2018
    Posts
    7
    O for the sake of an "S" ...
    added the 's' to the 'form' and miracles happen !!!
    will have to watch that for future reference ...

    MANY Thanks

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

Similar Threads

  1. Replies: 7
    Last Post: 04-28-2017, 12:52 PM
  2. Replies: 5
    Last Post: 04-09-2014, 06:57 PM
  3. Application Selection Report..?
    By leamas in forum Access
    Replies: 4
    Last Post: 07-12-2012, 09:29 AM
  4. Replies: 1
    Last Post: 09-21-2011, 03:21 AM
  5. Replies: 10
    Last Post: 01-31-2011, 02:16 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