Results 1 to 2 of 2
  1. #1
    BenPala is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Aug 2014
    Posts
    1

    Unhappy 'InputBox' Field Size

    In the 'InputBox' field I can only enter five characters. How can I increase the InputBox?

    Example: ="C:\Users\Documents\TPA\" & InputBox("Enter folder name:") & "\NEW\" & InputBox("Enter
    filename:") & ".xlsx".

    Thank you.

    BenPala

  2. #2
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,849
    I mocked up a form.
    a) design view
    b) after entering a number of characters.

    You may have to adjust your technique, but InputBox is not limited to 5 chars.



    Code:
    Private Sub Command2_Click()
              Dim x As String
              Dim ans As String
    getlongstring:
    10        x = InputBox("enter a string 6 or more characters in the text box", "          ")  'InputBox command here============
    20        If Len(x) >= 6 Then
    
    30        Else
    40            MsgBox "That's only " & Len(x) & " chars -- 6 or more"
    50            GoTo getlongstring
    60        End If
    70        Me.Text0 = Trim(x)
    80        ans = MsgBox("great, you entered " & Len(x) & " characters. Do you want to continue", vbYesNo)
    90        If ans = vbNo Then Application.Quit
    100       GoTo getlongstring
    
    End Sub
    Attached Thumbnails Attached Thumbnails capture_001_31082014_101741.jpg   capture_002_31082014_102021.jpg  

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 4
    Last Post: 04-06-2014, 12:56 PM
  2. Replies: 2
    Last Post: 03-20-2013, 04:25 PM
  3. Inputbox
    By mladen273 in forum Programming
    Replies: 8
    Last Post: 12-29-2012, 05:32 AM
  4. Reduce field size in query field
    By escapades_access in forum Queries
    Replies: 9
    Last Post: 03-13-2011, 12:21 PM
  5. OLE field size?
    By Wiele in forum Programming
    Replies: 2
    Last Post: 01-19-2011, 01:22 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