Results 1 to 5 of 5
  1. #1
    bbelly is offline Novice
    Windows 10 Access 2016
    Join Date
    Dec 2014
    Location
    Edmonton, Ab, Can
    Posts
    19

    If ( X or Y or Z, then ...) in Macro

    My goal is to assemble a text box creating a file name based on the fields which may or may not have any qualities. For example, a file named "Big Book" may be in French (FR) and/or in Large Print (LP) or PaperBack (PB). But it may have none of these conditions. So file names may be ...



    Big Book
    Big Book {FR}
    Big Book {FR,LP,PB}

    (there will be more information after this section, such as Year, Size)

    So the logical thread would be ... FileName + "{" if there are any qualities + "," if there are multiple qualities + "}" to close out the qualities + Year ,etc

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    It will be hard for anybody to help without knowing your data structure. This may help:

    http://allenbrowne.com/func-concat.html
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    bbelly is offline Novice
    Windows 10 Access 2016
    Join Date
    Dec 2014
    Location
    Edmonton, Ab, Can
    Posts
    19
    Perhaps the missing item is that the qualities are set by a check box, but then I'm looking for the items selected to return text (FR, LP, PB)

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    Probably not a normalized design, but perhaps:

    IIf(French = True, "FR", "")
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  5. #5
    bbelly is offline Novice
    Windows 10 Access 2016
    Join Date
    Dec 2014
    Location
    Edmonton, Ab, Can
    Posts
    19
    I have now discovered that there is an "OR" function (not mentioned in any listing in Access?) _BUT_ it has a different syntax than Excel. Is this a case of two program developers digging in their heels to say " no! MY way is right!" ? Sigh!

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

Similar Threads

  1. Replies: 3
    Last Post: 07-19-2017, 12:40 PM
  2. Replies: 7
    Last Post: 01-20-2017, 02:21 PM
  3. Replies: 1
    Last Post: 01-21-2015, 02:02 PM
  4. Replies: 1
    Last Post: 01-13-2015, 01:33 PM
  5. Replies: 0
    Last Post: 01-12-2011, 12:43 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