Share via

Table property for hover (screentip)

Anonymous
2010-08-20T14:28:42+00:00

I would like to add a hover button on my form's text boxes (frmAnswer.txtCom1, txtCom2, txtCom3...) that would allow the user to know just how many characters they can insert in these particular comment text boxes.  This form's record source = tblComments where the Data Types are either Memo or Text.  I have not been successful at figuring out how to programically obtain a field size in the text Data Type AND as an observation, the field size doesn't appear to be available in the memo data type.  Unfortunately the only part I can figure out is the hover part:

frmAnswer OnOpen()

Me.Controls("txtCom").Hyperlink.ScreenTip = "Enter table's field size"

Is this possible in Access 2003?

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

5 answers

Sort by: Most helpful
  1. Anonymous
    2010-08-26T09:57:23+00:00

    Normally, I just use the control's properties "ControlTip Text" field. Since there is a limit of charactors in the control for a textbox of 65536, just input that into the "ControlTip Text". I'm not sure why you need to use the code to check for field size in the table.


    Please Mark As Answered if it solved the problem.

    Was this answer helpful?

    0 comments No comments
  2. Anonymous
    2010-08-23T16:43:13+00:00

    I totally agree about the memo part and that the term" unlimited character count" or some version thereof will probably be hard coded as such.  But several of my text boxes are not memo and have a different set of character limitations based upon user needs.  This is the part where this question will be utilized.  I have not found any examples in this forum that helps me to write this correctly.  Can you point me in the right direction?

    Was this answer helpful?

    0 comments No comments
  3. Anonymous
    2010-08-23T16:23:18+00:00

    As Doug says, it doesn't really make sense to talk about the "size" of a memo field. If your user is sufficiently industrious and your computer doesn't go down, they can enter over two billion characters in a memo (well, 65536 using a form textbox, to be honest) - but in practice it's unlimited.


    John W. Vinson/MVP

    Was this answer helpful?

    0 comments No comments
  4. Anonymous
    2010-08-23T13:16:59+00:00

    Doug, Thanks for the response.  I've never used TableDefs before and had to do some research to get an idea of what I need in my code to utilize this.  After much researching I realized that I still need some assistance.

    Can you elaborate a little on how your code would be integrated with my situation?  Do I need to Dim anything up front?  Thank you.

    Was this answer helpful?

    0 comments No comments
  5. Anonymous
    2010-08-21T17:05:21+00:00

    You're absolutely correct that field size isn't an option in Memo fields, because the size of a Memo field is so large...

    To get the size of a Text field, you can use

    CurrentDb.TableDefs("NameOfTable").Fields("NameOfField").Size

    See whether setting the control's ControlTip Text property gives you the effect for which you're looking.

    --

    Doug Steele, Microsoft Access MVP

    http://www.AccessMVP.com/djsteele

    Co-author: "Access 2010 Solutions", published by Wiley

    (no e-mails, please!)

    "brian_kj" wrote in message news:*** Email address is removed for privacy ***...

    I would like to add a hover button on my form's text boxes (frmAnswer.txtCom1, txtCom2, txtCom3...) that would allow the user to know just how many characters they can insert in these particular comment text boxes.  This form's record source = tblComments where the Data Types are either Memo or Text.  I have not been successful at figuring out how to programically obtain a field size in the text Data Type AND as an observation, the field size doesn't appear to be available in the memo data type.  Unfortunately the only part I can figure out is the hover part:

    frmAnswer OnOpen()

    Me.Controls("txtCom").Hyperlink.ScreenTip = "Enter table's field size"

    Is this possible in Access 2003?


    Doug Steele, Microsoft Access MVP http://www.AccessMVP.com/djsteele (no e-mails, please!)

    Was this answer helpful?

    0 comments No comments