Microsoft Visual Basic for Application (VBA) controls use variables to store temporary information in the Access procedures, Word modules or Excel workbooks during the application execution. You need to use the word "Dim" (Dimension) followed by the chosen variable name and the word "As" followed by the variable type in order to declare a VBA variable. The VBA control variables represent a control on a form, report or section within another control. By declaring a variable as a form, you can reuse the existing VBA control objects.
Instructions
- 1Click the "Start" button in Windows and select "Microsoft Office" and then "Microsoft Visual Basic for Applications."
- 2Enter the following code in the window:Dim order As FormDoCmd.OpenForm "Customers"Set order = Forms!CustomersForm_Customers.Visible = TrueForm_Customers.Caption = "New Customers"
- 3Click "File" and "Save" to save the VBA script with the "order" form variable.
- 1
No comments:
Post a Comment