Page 1 of 2 12 LastLast
Results 1 to 15 of 20
  1. #1
    Gregm66 is offline Advanced Beginner
    Windows 10 Access 2013 32bit
    Join Date
    Sep 2016
    Posts
    36

    Help with textbox

    Hi everyone


    I'm new to the forum and new to using access.
    Appologise in advance if I post this in the wrong section.
    My database contains a table with 8 columns
    Columns 3,4,5 and 6 are all set to long text.
    My form has 2 text boxes that need to show more than 250 characters. If I copy and paste directly to the text box it shows all text. But when I select an item from my combo that textbox only shows 255 characters it won't show everything that's in my table. Is there a simple fix to get the textbox to allow more characters?

  2. #2
    Jaik is offline Advanced Beginner
    Windows 7 64bit Access 2007
    Join Date
    Aug 2016
    Posts
    33
    If you change your column's data type value to memo, it should work

  3. #3
    Gregm66 is offline Advanced Beginner
    Windows 10 Access 2013 32bit
    Join Date
    Sep 2016
    Posts
    36
    Thankyou for your quick reply access 2013 doesn't have memo they changed it to short text and long text.
    I checked that and they are set to long text.

  4. #4
    Jaik is offline Advanced Beginner
    Windows 7 64bit Access 2007
    Join Date
    Aug 2016
    Posts
    33
    Then, try click text box and Shift+f2 then paste your work

  5. #5
    Gregm66 is offline Advanced Beginner
    Windows 10 Access 2013 32bit
    Join Date
    Sep 2016
    Posts
    36
    Hi ok I tried that it is still not working.
    I changed to office 2010 set to memo
    And still no difference. Textbox on form will
    Only show 255 characters any other idead

  6. #6
    CJ_London is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,935
    it may be to do with what you are doing here
    But when I select an item from my combo that textbox
    - please clarify what this means - what code is run when you select something, and what is the rowsource - if it is your longtext field then you will find the maximum length that can be displayed in a combobox (or listbox) is 255 chars.

  7. #7
    JJJJJJJJ is offline Novice
    Windows 10 Access 2013 32bit
    Join Date
    Jul 2016
    Posts
    5
    I think I understand "But when I select an item from my combo that textbox only shows 255 characters" If you are setting the text box = to the info in the combo that makes seance combo boxes are not designed t5o display entire books as choices just a 255 character summary of the info. Try setting the text box not to the combo box but the actual data in you table. like Textbox1 = DLookUp("[Employee bio field that is thousands of characters long]", "Employees", "[EmployeeID] = 7") That should display the entire text in that field in your table even if it's a book of thousands of words. Don't forget to have the text box have scroll bars if the data is larger than the text box size.

  8. #8
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 8 Access 2013
    Join Date
    Aug 2013
    Posts
    7,862
    Memo was replaced with Long Text. However, as mentioned by Ajax and 8 J's, it seems perfectly reasonable to me that your combo will truncate Memo and Long Text.

    As for what the objective is, I do not understand.

  9. #9
    orange's Avatar
    orange is offline Moderator
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,870
    Greg,

    Please describe to us what you are trying to do in plain English --no database jargon. We want to help, but must clearly understand the issue/opportunity before proposing a solution(s).

    My database contains a table with 8 columns
    This is not a common set up.

  10. #10
    Gregm66 is offline Advanced Beginner
    Windows 10 Access 2013 32bit
    Join Date
    Sep 2016
    Posts
    36
    Hi all sorry I've been pretty busy all weekend only just back here to read replies. Ok I'll try to keep this simple.
    I have 2 combo boxes combo1 shows a category. Combo2 is filtered by that selection. Ounce combo2 selection is made the text boxes should display the corresponding info from my table.
    But I think the idea of dlookup is proberbly the way to go.
    As no matter what I try I can not see all the info. I've done all this in excel but not sure about the code for access to dlookup the textbox

  11. #11
    Gregm66 is offline Advanced Beginner
    Windows 10 Access 2013 32bit
    Join Date
    Sep 2016
    Posts
    36
    My table is called Recipes.
    The fields are: category. RcpName. RcpIngredients.
    Rcpmethod. Notes. Nutritional info and count.
    My form is called Recipes.
    My combo boxes are combo8 and combo9.
    My text boxes are all named the same as my table fields.
    So what would be the dlookup for my textbox called Rcpmethod? And I guess it would also need to look at the selection made in combo9.
    By the way my 2 combo's are cascading.

  12. #12
    CJ_London is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,935
    sounds like you are trying to apply excel logic to a database, which won't work - also looks like your table is not normalised - I would expect rcpIngredients to be in a separate table as perhaps would NutrionalInfo. And don't know what count is - other than it is a reserved word so could cause issues.

    Assuming you just have the one table, what I would expect you to have is:
    Code:
    1. a unique ID (autonumber and primary key) field in your table - if not there, add it in
    2. a single form with a recordsource of your table Recipies with controls for each field you want to see, suitably sized to view the data
    3. combo8 would be unbound (no recordsource) with
      1. a rowsource of SELECT DISTINCT Category FROM Recipes ORDER BT Category
      2. columncount=1
      3. bound column=1
      4. in the afterupdate event of combo1 put some vba code - combo2.requery
    4. combo9 would also be unbound with
      1. a rowsource of SELECT ID, RcpName FROM Recipies WHERE Category=[combo8] ORDER BY RcpName
        1. columncount=2
        2. bound column=1
        3. columnwidth=0
        4. in the afterupdate event of combo9 put the following vba code
    me.filter="[ID]=" &Combo2 me.filteron=true
    that is all you should need to do

    Once you have done that, please clarify if that resolves your longtext issue

  13. #13
    CJ_London is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,935
    one other question - I'm assuming this is a client based (i.e. not web based) db

  14. #14
    Gregm66 is offline Advanced Beginner
    Windows 10 Access 2013 32bit
    Join Date
    Sep 2016
    Posts
    36
    Hi Ajax thanks for your reply yes it runs locally on my system. My menuid is set to primary.
    I've tried putting dlookup in the control source didn't work.
    Also tried after update event and it still doesn't work am I putting the code in the wrong place?

  15. #15
    CJ_London is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,935
    in my post #12, where have I said use a dlookup?

    Are you saying that you have exactly the same as I've suggested (other than changing ID to MenuID)?

    And which afterupdate event are you referring to? the form? one of the combo's? another control?

Page 1 of 2 12 LastLast
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 2
    Last Post: 04-29-2016, 09:06 PM
  2. Replies: 2
    Last Post: 01-26-2016, 08:08 AM
  3. Replies: 2
    Last Post: 12-22-2015, 09:09 PM
  4. Replies: 5
    Last Post: 04-30-2015, 01:50 AM
  5. Replies: 2
    Last Post: 04-20-2013, 03:37 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums