Hi All.
I would like to open form with according title. For that I create following code:
When I run the form I'm getting error message:
Compile error:
Variable not defined.
I know that causes is Option Explicit. When I comment it the caption works. How to change the code to keep Option Explicit and have ability to modify a form title programmatically?
Thanks.
I would like to open form with according title. For that I create following code:
Code:
Option Compare Database
Option Explicit
Private Sub Form_Open(Cancel As Integer)
FormArg = Split(Form.OpenArgs, ",")
Me.Caption = FormArg(1)
End Sub
Compile error:
Variable not defined.
I know that causes is Option Explicit. When I comment it the caption works. How to change the code to keep Option Explicit and have ability to modify a form title programmatically?
Thanks.
Last edited: