Form Caption = txtField ?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • hjeff71
    New Member
    • Nov 2007
    • 8

    Form Caption = txtField ?

    is there a way to have the content of a field to be displayed in the Form Caption ??
  • JKing
    Recognized Expert Top Contributor
    • Jun 2007
    • 1206

    #2
    Yes, you can programatticall y reference the form caption and set it equal to a text field.

    You'll need to decide on what event you want this to fire off at but it's fairly simple and the line would look something like this:
    [code=vb]
    Me.Caption = Me.txtMyField
    [/code]

    Where txtMyField is a field on your form.

    Comment

    • missinglinq
      Recognized Expert Specialist
      • Nov 2006
      • 3533

      #3
      I have a form with multiple tabbed pages in a home care database. The patient's name and ID data is listed on the first tabbed page, but so that users can keep track of whose record they're working on, when they're on one of the other tabbed pages, I use
      [CODE=vb]Form_Current()
      Me.Caption = Me.PatientName
      End Sub[/CODE]
      That way, the caption changes with each record, and by simply glancing up, the user can tell "Who's on first?"

      Welcome to TheScripts!

      Linq ;0)>

      Comment

      • hjeff71
        New Member
        • Nov 2007
        • 8

        #4
        perfect,
        great,
        thks guys!

        Comment

        • missinglinq
          Recognized Expert Specialist
          • Nov 2006
          • 3533

          #5
          Glad we could help!

          Linq ;0)>

          Comment

          Working...