Results 1 to 3 of 3
  1. #1
    New Lounger
    Join Date
    Aug 2001
    Posts
    20
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Putting the control's value in a MsgBox function (ACCESS 2000)

    I am trying to display the contents of a control in the message portion of a MsgBox function. When I put the control name in, what I'm getting is just the control name rather than the value in the message string. I'm missing something, can anyone help?

  2. #2
    Super Moderator
    Join Date
    Jun 2002
    Location
    Mt Macedon, Victoria, Australia
    Posts
    3,993
    Thanks
    1
    Thanked 45 Times in 44 Posts

    Re: Putting the control's value in a MsgBox function (ACCESS 2000)

    Try something like

    msgbox("This is the value of " & forms!frmMyform!txtctrl )
    Regards
    John



  3. #3
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Putting the control's value in a MsgBox function (ACCESS 2000)

    If the messagebox is being launched from within the form, you don't need a full reference to the form. Either of the following will work:

    msgbox("This is the value of " & [txtctrl] )
    msgbox("This is the value of " & me!txtctrl )
    Charlotte

Posting Permissions

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