+ Reply to Thread
Results 1 to 5 of 5

How do I get an entry in one table to generate the rows in an additional table?

  1. #1
    Registered User
    Join Date
    01-13-2014
    Location
    Christchurch, New Zealand
    MS-Off Ver
    Excel 2010
    Posts
    64

    How do I get an entry in one table to generate the rows in an additional table?

    So I have set up my form (See Attached) but becaause of the protection on it you are unable to delete empty rows in the second table. Is there any way I can get the form to generate rows 2 and 3 (identified in the attachment) only when data is placed into the donation number field of table 1?

    It's a long shot but it would save on seeing empty boxes and give the form a lot neater look.

    Thanks in advance for any help

    Gav

    HPC form.docx

  2. #2
    Forum Expert macropod's Avatar
    Join Date
    12-22-2011
    Location
    Canberra, Australia
    MS-Off Ver
    Word, Excel & Powerpoint 2003 & 2010
    Posts
    3,778

    Re: How do I get an entry in one table to generate the rows in an additional table?

    See: http://www.msofficeforums.com/word-v...html#post38461
    Cheers,
    Paul Edstein
    [Fmr MS MVP - Word]

  3. #3
    Registered User
    Join Date
    01-13-2014
    Location
    Christchurch, New Zealand
    MS-Off Ver
    Excel 2010
    Posts
    64

    Re: How do I get an entry in one table to generate the rows in an additional table?

    Thanks for the link Paul

    I have being amending an example to suit my needs but the examples were based on the row being added to the same table however I am wanting to add mine to the second table on my form. In addition my VBA knowledge is a work in progress.

    I think I've sorted the 2nd table entry but have hit a slight problem in that my 2nd table contains merged rows and because of this the code below is giving me a runtime error
    Please Login or Register  to view this content.
    How can I change this to accept merged cells? Would it be better to enclose the entire code for you to view?

    Thanks again

    Gav

  4. #4
    Forum Expert macropod's Avatar
    Join Date
    12-22-2011
    Location
    Canberra, Australia
    MS-Off Ver
    Word, Excel & Powerpoint 2003 & 2010
    Posts
    3,778

    Re: How do I get an entry in one table to generate the rows in an additional table?

    Working with tables that have merged cells is always problematic, since it's hard to write any generalised code that could work with the range of possibilities. Furthermore, it's impossible to reference a given row when there are merged cells above it. When you add a row to such a table in which, say, the last existing row has a vertically merged cell, an entire new row id added without extending the merged cell. Consequently, you then have to handle any merging requirements post-addition.

    The best you can do when merged cells are involved is to work with the RowIndex & ColumnIndex of each cell, but even then it's hard to know whether, from a coding perspective, how cells with changing row & column indicies relate to a visual row/column. Basically, you have to know these details when writing the code. Tough if the table structure is dynamic.

    My advice: avoid merged cells if possible and, if not, consider either unmerging/remerging either side of the row addition code or, if possible, temporarily split the table below the last merged row before adding the new row.

  5. #5
    Registered User
    Join Date
    01-13-2014
    Location
    Christchurch, New Zealand
    MS-Off Ver
    Excel 2010
    Posts
    64

    Re: How do I get an entry in one table to generate the rows in an additional table?

    Thanks for the advice given the effort and time this requires I'm putting it in a too hard basket for now and may revisit another time.

    Thanks again for your input.
    Gav

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. updating pivot table to include additional rows
    By Ellen in forum Excel General
    Replies: 4
    Last Post: 07-28-2014, 03:54 PM
  2. [SOLVED] Code to move data from an entry table to a historical table by date.
    By rlh in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-17-2014, 11:04 AM
  3. Replies: 4
    Last Post: 03-05-2014, 02:40 AM
  4. Copy/insert additional data entry rows
    By CLEE7093 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-25-2012, 08:57 AM
  5. Using Macro to link sql table to generate Pivot Table
    By Benard in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-22-2008, 06:02 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1