home *** CD-ROM | disk | FTP | other *** search
/ Media Share 9 / MEDIASHARE_09.ISO / dbase / acessq_a.zip / WX0637.TXT < prev    next >
Text File  |  1992-10-12  |  4KB  |  87 lines

  1. ======================================================================
  2.   Microsoft(R) Product Support Services Application Note (Text File)
  3.                    WX0637: FORMS QUESTIONS & ANSWERS
  4. ======================================================================
  5.                                                   Revision Date: 10/92
  6.                                                       No Disk Included
  7.  
  8. The following information applies to Microsoft Access(TM) version 1.0.
  9.  
  10.  --------------------------------------------------------------------
  11. | INFORMATION PROVIDED IN THIS DOCUMENT AND ANY SOFTWARE THAT MAY    |
  12. | ACCOMPANY THIS DOCUMENT (collectively referred to as an            |
  13. | Application Note) IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY      |
  14. | KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO    |
  15. | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A     |
  16. | PARTICULAR PURPOSE. The user assumes the entire risk as to the     |
  17. | accuracy and the use of this Application Note. This Application    |
  18. | Note may be copied and distributed subject to the following        |
  19. | conditions: 1) All text must be copied without modification and    |
  20. | all pages must be included; 2) If software is included, all files  |
  21. | on the disk(s) must be copied without modification [the MS-DOS(R)  |
  22. | utility DISKCOPY is appropriate for this purpose]; 3) All          |
  23. | components of this Application Note must be distributed together;  |
  24. | and 4) This Application Note may not be distributed for profit.    |
  25. |                                                                    |
  26. | Copyright 1992 Microsoft Corporation. All Rights Reserved.         |
  27. | Microsoft and MS-DOS are registered trademarks and Microsoft       |
  28. | Access and Windows are trademarks of Microsoft Corporation.        |
  29.  --------------------------------------------------------------------
  30.  
  31. 1. Q. How do I invoke my Microsoft Access Basic code from within a
  32.       form?
  33.  
  34.    A. To call a function from a property, type the following:
  35.  
  36.         =function name()
  37.  
  38.       The equal sign and parentheses are required. You can call an
  39.       Access Basic function from form or control properties, such as
  40.       After Update or Default Value. Search for the name of a specific
  41.       property in Help for examples. Subroutines cannot be called from
  42.       properties. For more information, please refer to "An
  43.       Introduction to Programming," Chapter 7, page 1.
  44.  
  45. 2. Q. Do form rules override table rules?
  46.  
  47.    A. Yes, form rules do override table rules. When you position fields
  48.       on a form by dragging them from the Field list, the validation
  49.       property for the field inherits the validation rule that was
  50.       defined for the field in the table design.
  51.  
  52. 3. Q. When is it appropriate to use the exclamation point versus
  53.       the period when identifying objects and properties in an
  54.       expression?
  55.  
  56.    A. A good rule of thumb is to use the exclamation point before
  57.       anything you specifically name (such as the name of your form or
  58.       a control on the form) and to use a period before anything
  59.       Microsoft Access names (such as a property).
  60.  
  61. 4. Q. Why doesn't the header I created show in Form view?
  62.  
  63.    A. The header you created was most likely a page header. There are
  64.       two different types of headers available on forms: form headers
  65.       and page headers. A form header is displayed on-screen and when
  66.       printed; a page header is displayed only when printed.
  67.  
  68. 5. Q. How do I reference a control on a subform?
  69.  
  70.    A. To reference the subform control itself, you must use the form
  71.       property of the subform control as follows:
  72.  
  73.         forms![master form name]![subform control name].form![control
  74.         name]
  75.  
  76. 6. Q. When are validation rules on a form evaluated?
  77.  
  78.    A. Microsoft Access evaluates a validation rule only when data is
  79.       entered or edited in a field and the cursor is moved to a
  80.       different field or record. If you leave the field unchanged, the
  81.       validation rule is not evaluated. Microsoft Access also validates
  82.       a field on a form when you leave the form, when you switch views,
  83.       or when you close the form. To check for nulls, you must use a
  84.       macro. For more information, please refer to Chapter 22 of the
  85.       "User's Guide."
  86.  
  87.