ACC97: Documentation Error in "OldValue Property" Help Topic

Last reviewed: October 31, 1997
Article ID: Q175961
The information in this article applies to:
  • Microsoft Access 97

SUMMARY

Moderate: Requires basic macro, coding, and interoperability skills.

In the sample code in the Microsoft Access 97 "OldValue Property" Help topic that reads as follows, the last line before the End Sub statement (Next ctl) is incorrect:

   Sub btnUndo_Click()
      Dim ctlTextbox As Control
      For Each ctlTextbox in Me.Controls
         If ctlTextbox.ControlType = acTextBox Then
            ctlTextbox.Value = ctl.OldValue
         End If
      Next ctl
   End Sub

The correct code is as follows:

   Sub btnUndo_Click()
      Dim ctlTextbox As Control
      For Each ctlTextbox in Me.Controls
         If ctlTextbox.ControlType = acTextBox Then
            ctlTextbox.Value = ctl.OldValue
         End If
      Next ctlTextbox
   End Sub

Note that the correct syntax for the last line before the End Sub statement is Next ctlTextbox, not Next ctl.

REFERENCES

For more information about the OldValue Property, search the Help Index for "OldValue," or ask the Microsoft Access 97 Office Assistant.


Additional query words: inf documentation
Keywords : PgmErr kbprg
Version : WINDOWS:97
Platform : WINDOWS
Issue type : kbdocerr
Solution Type : Info_Provided


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: October 31, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.