Results 1 to 6 of 6
  1. #1
    Abacus1234 is offline Competent Performer
    Windows Vista Access 2010 32bit
    Join Date
    Nov 2011
    Posts
    212

    Can a word table be made visible or invisible by using an if statement?

    I run a merge process from VBA code to create word documents. I would like to add 2 word tables to a document and only show them based on some parameter or mergefield in the data.
    Is this possible? Can a table be identified? Like Table 1. And can it be made invisible?


    Thanks for any help.

  2. #2
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    7,862
    If you create a table using VBA then it has an identity. Maybe use formatting to change the font to white?

  3. #3
    Abacus1234 is offline Competent Performer
    Windows Vista Access 2010 32bit
    Join Date
    Nov 2011
    Posts
    212
    Thanks for the suggestion, and I love the idea of changing the font color, neat. The process I have for merging and printing deals with hundreds of documents, so I don't really want to start injecting code for any individual document. If I could find a solution within the word document, like the use of a bookmark or if I could reference a column in the document, that would be ideal. My fallback is to have 4 different documents to choose from, but that is not an optimum solution.

  4. #4
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    7,862
    The purpose of Access is to manage data. It seems you may be losing focus of that point. I say this because you are looking for an unconventional solution. Sometimes it is important to think outside the box, when business mandates it. If mail merge is something that can easily be avoided, I would avoid it.

    The solution within Access that I would, first, try to implement is a report. Reports can be exported as PDF, Word, etc. It is probably not what you want to hear. However, this is an Access forum and most of us will put Access first and Word or PDF second. If you take a step back to look at the big picture, you may discover that mail merge is not necessary. Regardless of what is currently implemented, I always look for a conventional approach. Otherwise, I will expect to throw Band-Aid after Band-Aid onto a multilayered onion. Peel back the layers and you will find data at the center. Limit the number of layers however possible, always.

  5. #5
    Abacus1234 is offline Competent Performer
    Windows Vista Access 2010 32bit
    Join Date
    Nov 2011
    Posts
    212
    Thanks for your response. Just to finish this thread, I have found a solution within the word document, just using If statements for each row in the table so that the table shows up if a certain field contains data and not if it doesn't. I had to work I columns which I avoid if possible.

  6. #6
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    7,862
    Thanks for the follow up. There is nothing wrong with managing data from another program like Word.

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

Similar Threads

  1. Making a Command Buttong Visible/Invisible
    By Lupson2011 in forum Forms
    Replies: 3
    Last Post: 02-16-2012, 12:03 PM
  2. Making subform field visible/invisible
    By Snufflz in forum Forms
    Replies: 3
    Last Post: 01-17-2011, 05:30 AM
  3. Invisible/visible box
    By teirrah1995 in forum Forms
    Replies: 4
    Last Post: 10-03-2010, 02:45 AM
  4. Setting fields visible/invisible
    By col5473 in forum Forms
    Replies: 1
    Last Post: 09-17-2010, 09:14 AM
  5. Combo Boxes Visible/Invisible
    By Rick West in forum Forms
    Replies: 2
    Last Post: 07-06-2010, 09:41 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