Page 2 of 2 FirstFirst 12
Results 16 to 20 of 20
  1. #16
    aytee111 is offline Competent At Times
    Windows 10 Access 2013 64bit
    Join Date
    Nov 2011
    Location
    Nomad
    Posts
    3,936
    Create the query, use report wizard to create the report the way you want it.

  2. #17
    plackowski is offline Novice
    Windows 7 64bit Access 2016
    Join Date
    Feb 2017
    Posts
    15
    The other reason it needs to be in VBA is because each cable has a type, like Controls, Power, or Instrumentation. The Cable table lets the user assign a purpose, and there's another table called CableType which equates each cable type with a code. So supposing I want to put cables 001, 002, and 003 which are for Controls, Power, and Instrumentation respectively into conduit C034 which goes from point A to point B, 1 row in my final report would look like this:

    Conduit From To Contents
    C034 Point A Point B 001C, 002P, 003I

  3. #18
    aytee111 is offline Competent At Times
    Windows 10 Access 2013 64bit
    Join Date
    Nov 2011
    Location
    Nomad
    Posts
    3,936
    OK. Will there always be three, or up to three, cables for each conduit? Or is it a unknown number?

  4. #19
    plackowski is offline Novice
    Windows 7 64bit Access 2016
    Join Date
    Feb 2017
    Posts
    15
    The number of cables in each conduit is variable. It needs to be determined by the number of rows in the CableRoute table that point to that particular conduit. You also might have some conduits that are empty - they are spares for later use.

  5. #20
    aytee111 is offline Competent At Times
    Windows 10 Access 2013 64bit
    Join Date
    Nov 2011
    Location
    Nomad
    Posts
    3,936
    Yes then you will have to use VBA to put all those records in one string like you have it above. Either you can call the function from the query or you can do it in the OnLoad of the report. You will read thru all the cable records and put them into one long string for each conduit. Create a query with all other fields you need and then this one field will be added, so that your record source will be SELECT Query1.*,'" & contents & "' AS Contents FROM Query1;

Page 2 of 2 FirstFirst 12
Please reply to this thread with any new information or opinions.

Similar Threads

  1. String Literacy with Quotation Issue
    By excellenthelp in forum Programming
    Replies: 5
    Last Post: 07-31-2014, 09:05 AM
  2. InStr() and quotation marks
    By Puebles in forum Programming
    Replies: 3
    Last Post: 11-22-2013, 07:36 AM
  3. Quotation Mark Hell
    By shurstgbr in forum Programming
    Replies: 4
    Last Post: 06-13-2011, 06:17 AM
  4. Concatenate Quotation Marks
    By millerdav99 in forum Programming
    Replies: 3
    Last Post: 04-11-2011, 09:36 AM
  5. Transferring text within quotation marks
    By Lynette in forum Access
    Replies: 6
    Last Post: 11-24-2010, 11:58 AM

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