+ Reply to Thread
Results 1 to 7 of 7

Access text box with no spaces

  1. #1
    Registered User
    Join Date
    06-13-2019
    Location
    London
    MS-Off Ver
    2018
    Posts
    20

    Access text box with no spaces

    Hi,
    I have a question about my textbox in Access (form) where I would like the values ​​to always be without spaces (they are deleted when typing and pasting text). I tried to apply:
    Please Login or Register  to view this content.
    But this only works for typing, and I would also like to remove the pasted spaces in the text field.
    Thank you in advance for your answer.

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,532

    Re: Access text box with no spaces

    This looks like a VBA UserForm rather than an Access form. If Tekst1 is an ActiveX text box, how about:

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    06-13-2019
    Location
    London
    MS-Off Ver
    2018
    Posts
    20

    Re: Access text box with no spaces

    I tried to apply the code but i get an error message:
    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by Maxlond; 12-03-2020 at 01:37 PM.

  4. #4
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,532

    Re: Access text box with no spaces

    This is an Access form, not a UserForm, and I have no experience with those.

  5. #5
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2403 Win 11 Home 64 Bit
    Posts
    23,810

    Re: Access text box with no spaces

    If all entries are the same length, then you may want to consider an Input Mask in the Bound Table for the Field. If they are of different length, then will need to do some research. Have you tried Google Search?

    Found this as a possible solution: https://social.msdn.microsoft.com/Fo...=csharpgeneral
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  6. #6
    Registered User
    Join Date
    06-13-2019
    Location
    London
    MS-Off Ver
    2018
    Posts
    20

    Re: Access text box with no spaces

    The input mask will not work because the values ​​have different values.

  7. #7
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2403 Win 11 Home 64 Bit
    Posts
    23,810

    Re: Access text box with no spaces

    Did you look at the link I provided. It is a different type of solution or did you just dismiss it based upon my earlier suggestion?

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Join 2 csv files in different paths having spaces, with ODBC MICROSOFT ACCESS TEXT DRIVER
    By junoon in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-06-2019, 08:49 AM
  2. Replies: 9
    Last Post: 12-31-2018, 01:29 PM
  3. [SOLVED] How to add spaces to text?
    By Sekars in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 12-22-2017, 05:17 AM
  4. Replies: 1
    Last Post: 08-16-2016, 04:39 PM
  5. Extracting text between 6th and 7th spaces
    By cmb80 in forum Excel General
    Replies: 2
    Last Post: 08-12-2016, 05:16 AM
  6. Use an Excel Macro in Access VBA - Import text file in Access Table
    By joogibabu in forum Access Tables & Databases
    Replies: 3
    Last Post: 10-08-2014, 10:04 AM
  7. Text with Spaces
    By Trigger99 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 01-25-2013, 11:41 AM

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1