From: jkitzy on 8 Mar 2010 19:19 I have a form with several tables and fields within the tables. I've added buttons to expand/contract the table, enabling users to only see those rows they'll use. This keeps clutter off the page and makes the form more dynamic. I have no issues with this function; it's great! Let's call them Rows 2 through 14 My problem arises when the user clicks the minus button. To prevent data from being stored when it shouldn't, the fields in the deleted row are first cleared, then hidden, then disabled. This prevents tabbers from tabbing through hidden fields. So far so good. The problem comes in row 15 - where my totals are stored. Because the macro doesn't actually exit the fields when they're cleared, my totals don't update. Can't quite figure this out. The fields are set to calculate on exit, so when adding rows, no problem. When the users enter an amount, it recalculates fine. It's only when I'm deleting and clearing the results of the field that I have a problem. Any thoughts? Thanks. -- --jkitzy
From: Doug Robbins - Word MVP on 8 Mar 2010 21:14 Include the code in your macro to update the formfield containing the result of the calculation Something like ActiveDocument.Bookmarks("bookmarknameofformfield").Range.Fields.Update -- Hope this helps. Please reply to the newsgroup unless you wish to avail yourself of my services on a paid consulting basis. Doug Robbins - Word MVP, originally posted via msnews.microsoft.com "jkitzy" <jkitzy(a)discussions.microsoft.com> wrote in message news:DF5A0ADA-E5F6-47BA-B19E-FEDD609D2F5B(a)microsoft.com... > I have a form with several tables and fields within the tables. I've added > buttons to expand/contract the table, enabling users to only see those > rows > they'll use. This keeps clutter off the page and makes the form more > dynamic. I have no issues with this function; it's great! > > Let's call them Rows 2 through 14 > > My problem arises when the user clicks the minus button. To prevent data > from being stored when it shouldn't, the fields in the deleted row are > first > cleared, then hidden, then disabled. This prevents tabbers from tabbing > through hidden fields. > > So far so good. The problem comes in row 15 - where my totals are stored. > Because the macro doesn't actually exit the fields when they're cleared, > my > totals don't update. > > Can't quite figure this out. The fields are set to calculate on exit, so > when adding rows, no problem. When the users enter an amount, it > recalculates > fine. It's only when I'm deleting and clearing the results of the field > that > I have a problem. > > Any thoughts? Thanks. > > -- > --jkitzy
From: jkitzy on 9 Mar 2010 14:25 Thanks. Phew! I knew it had to be something simple! Muchas Gracias! -- --jkitzy "Doug Robbins - Word MVP" wrote: > Include the code in your macro to update the formfield containing the result > of the calculation > > Something like > > ActiveDocument.Bookmarks("bookmarknameofformfield").Range.Fields.Update > > -- > Hope this helps. > > Please reply to the newsgroup unless you wish to avail yourself of my > services on a paid consulting basis. > > Doug Robbins - Word MVP, originally posted via msnews.microsoft.com > > "jkitzy" <jkitzy(a)discussions.microsoft.com> wrote in message > news:DF5A0ADA-E5F6-47BA-B19E-FEDD609D2F5B(a)microsoft.com... > > I have a form with several tables and fields within the tables. I've added > > buttons to expand/contract the table, enabling users to only see those > > rows > > they'll use. This keeps clutter off the page and makes the form more > > dynamic. I have no issues with this function; it's great! > > > > Let's call them Rows 2 through 14 > > > > My problem arises when the user clicks the minus button. To prevent data > > from being stored when it shouldn't, the fields in the deleted row are > > first > > cleared, then hidden, then disabled. This prevents tabbers from tabbing > > through hidden fields. > > > > So far so good. The problem comes in row 15 - where my totals are stored. > > Because the macro doesn't actually exit the fields when they're cleared, > > my > > totals don't update. > > > > Can't quite figure this out. The fields are set to calculate on exit, so > > when adding rows, no problem. When the users enter an amount, it > > recalculates > > fine. It's only when I'm deleting and clearing the results of the field > > that > > I have a problem. > > > > Any thoughts? Thanks. > > > > -- > > --jkitzy >
|
Pages: 1 Prev: Update all docvariables in all active documents Next: Random AutoText entries |