Results 1 to 10 of 10

Thread: Form's Caption

  1. #1
    Join Date
    Jul 2009
    Posts
    185

    Unanswered: Form's Caption

    Can I set the form's caption property from vb?

  2. #2
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    me.caption = "blah"
    if you want to do it from code, can be done from anywhere, but usually its set either int he forms on load event or the forms on current record event
    I'd rather be riding on the Tiger 800 or the Norton

  3. #3
    Join Date
    May 2005
    Location
    Nevada, USA
    Posts
    2,888
    Provided Answers: 6
    Yes, you can. Have you looked in VBA help?
    Paul

  4. #4
    Join Date
    Jul 2009
    Posts
    185
    I don't have vb help files yet. I am worhing on it.

    I tried but get a error "outside error" so something like that.
    Private Sub Form_Load()
    Me.Caption = "Update Flights Version 5 07/07/2009"
    MsgBox "form_load"
    End Sub

  5. #5
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    it may be that the form load is the wrong event.. theres another event that fires soon after the form load..

    I seem to remember that there can be problems setting things int he form load event.
    perhaps its form open.....

    what you dom't have the help files yet...... must be dicky installation.. I'd suggest you re-install Access.
    I'd rather be riding on the Tiger 800 or the Norton

  6. #6
    Join Date
    Jul 2009
    Posts
    185
    I don't thing the vb help come with Access 2000 as it keep asking for visual Studio disks when I try and load the vb help files.

  7. #7
    Join Date
    Jul 2009
    Posts
    185
    I've tried
    Private Sub Form_Open(Cancel As Integer)
    MsgBox "form_load"
    Me.Caption = "Update Flights Version 5 07/07/2009"
    End Sub

    Same problem.

    Maybe I'll just put a unbound text field at the top of form for the status text that I am used to putting in the form's caption in Clarion.

  8. #8
    Join Date
    Mar 2009
    Posts
    5,442
    Provided Answers: 14
    This is strange. I have tried with the Form_Load and the Form_Open events, both in Access 2000 and in Access 2003 and it worked without any problem.

    Can you be more precise on the error you have (error code and exact message) ?

    Have a nice day!

  9. #9
    Join Date
    Jul 2009
    Posts
    185
    Private Sub Form_Open(Cancel As Integer)
    'MsgBox "form_load"
    Me.Caption = "Update Flights Version 5 07/07/2009"
    End Sub

    The expression on open you entered as the event proptery setting produced the following error: Invalid outside produce.
    *The expression may not result in the name of a macro, the name of a user-defined function, or [Event Procedure].
    * There may have been an error evaluating the function, event, or macro.

  10. #10
    Join Date
    Jul 2009
    Posts
    185
    Soory it works now on a different form. I don't know what is causing the error now.
    Thank for your time.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •