L
lmv
In the caption of a form I have whatever it is in the caption field naming
the form ie: Legend, search. edit info etc
I have different databases for different areas so I want it to pull
additional info into the caption.
I know how to change the caption (see following code) BUT I don't know how
to add the info in the caption field on the fly (ie "Legend", edit info"
etc) to that code. I don't want to hard code the words.
I don't know what the code is for the caption lookup.
I also want the DB to startup with the code
= DLookup("[CongName]", "[tblCongInfo]")
I don't know how to do it other than hardcoding it into the startup is there
a way?
Private Sub Form_Activate()
On Error GoTo ProcError
' Change the form's caption!
Me.Caption = DLookup("[CongName]", "[tblCongInfo]")
ExitProc:
Exit Sub
ProcError:
MsgBox "Error " & Err.Number & ": " & Err.Description
Resume ExitProc
End Sub
thanks!!
the form ie: Legend, search. edit info etc
I have different databases for different areas so I want it to pull
additional info into the caption.
I know how to change the caption (see following code) BUT I don't know how
to add the info in the caption field on the fly (ie "Legend", edit info"
etc) to that code. I don't want to hard code the words.
I don't know what the code is for the caption lookup.
I also want the DB to startup with the code
= DLookup("[CongName]", "[tblCongInfo]")
I don't know how to do it other than hardcoding it into the startup is there
a way?
Private Sub Form_Activate()
On Error GoTo ProcError
' Change the form's caption!
Me.Caption = DLookup("[CongName]", "[tblCongInfo]")
ExitProc:
Exit Sub
ProcError:
MsgBox "Error " & Err.Number & ": " & Err.Description
Resume ExitProc
End Sub
thanks!!