Share via

Form Caption

Anonymous
2015-03-04T21:02:52+00:00

I'm trying to change the form caption dynamically based on the record selected.  I have a project database and I want the form caption to show the current project.  I've tried this in the after update:

Private Sub Form_AfterUpdate()

    Me.Form.Caption = Me.ProjectName

End Sub

ProjectName is the name of the filed I want to change the caption to.  However, this is not working at all.  

Any help is greatly appreciated.

Using:

Microsoft Access 2007

Windows 7

Microsoft 365 and Office | Access | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

4 answers

Sort by: Most helpful
  1. ScottGem 68,830 Reputation points Volunteer Moderator
    2015-03-04T21:37:48+00:00

    Use the On Current event of the form and use Me.Caption

    Was this answer helpful?

    4 people found this answer helpful.
    0 comments No comments
  2. ScottGem 68,830 Reputation points Volunteer Moderator
    2015-03-05T12:47:12+00:00

    Yeah, I was about to test it, because I was sure that should work. 

    Glad you got it.

    Was this answer helpful?

    0 comments No comments
  3. Anonymous
    2015-03-04T21:42:01+00:00

    Scott,

    I figured it out.  I forgot to enable content when I initially opened the database.  I shut it down and opened it back up, enabling content, and it worked.

    Thanks for the help and the response.

    v/r

    Was this answer helpful?

    0 comments No comments
  4. Anonymous
    2015-03-04T21:39:35+00:00

    Scott,

    I tried that too and it didn't work.

    Private Sub Form_Current()

        Me.Caption = Me.ProjectName

    End Sub

    Was this answer helpful?

    0 comments No comments