Results 1 to 3 of 3
  1. #1
    Lounger
    Join Date
    Mar 2003
    Posts
    46
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Change Form Caption When Moving From Records (Access 2k)

    How can i accomplish this...
    As I move from one client's record to another I want the form caption (frmClientInfo) to display the form name and in parenthesis the client's first and last name. FOr e.g. if I am working on John Smith's record, I would like for the form caption to say Client Info (John Smith) and as I move to Tory Smith's record, the caption will say Client Info (Tory Smith)

  2. #2
    5 Star Lounger
    Join Date
    Nov 2004
    Location
    Wilmington, North Carolina, USA
    Posts
    1,196
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Change Form Caption When Moving From Records (Access 2k)

    For your form's On Current event, use this

    Me.Caption = "Client Info " & [ClientFirstName] & " " & [ClientLastName]


    etc...
    ____________________________
    Jeremy
    "If you spend more on coffee than on IT security, then you will be hacked. What's more, you deserve to be hacked." -Richard Clarke

  3. #3
    4 Star Lounger
    Join Date
    Jan 2002
    Location
    Brookings, South Dakota, USA
    Posts
    449
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Change Form Caption When Moving From Records (Access 2k)

    I keep a hidden textbox on the form whose control source has the value I want to display. (you can also use DLookup as well)
    TheniIn the OnCurrent event of the form:

    Dim strCaption As String
    strCaption = "Client Info '" & Me!txtTextBoxName & "'"
    Me.Form.Caption = strCaption

    gdr
    <IMG SRC=http://www.wopr.com/w3tuserpics/gdrezek_sig.jpg>
    "Those who dance are considered insane by those who can't hear the music" - George Carlin

Posting Permissions

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