A lot of ways to remove or trim the spaces and this normaly I do:

1) Paste this code to a new module:

=========== code start ==========
Option Compare Database
Option Explicit

'This function replace the built-in Replace function:
Function FindAndReplace(ByVal strInString As String, _
        strFindString As String, _
        strReplaceString As String) As String
Dim intPtr As Integer

    ''Debug.Print strInString

    If Len(strFindString) > 0 Then  'catch if try to find empty string
        Do
            intPtr = InStr(strInString, strFindString)
            If intPtr > 0 Then
                FindAndReplace = FindAndReplace & Left(strInString, intPtr -
1) & _
                                        strReplaceString
                    strInString = Mid(strInString, intPtr +
Len(strFindString))
            End If
        Loop While intPtr > 0
    End If
    FindAndReplace = FindAndReplace & strInString

End Function
================ code end ===============

2) dim strMyPartCode as string
strMyPartCode=FindAndReplace(strMyPartCode, " ", "")


HTH



-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED]
Behalf Of Joanne Yargeau
Sent: Wednesday, October 04, 2006 10:07 PM
To: [email protected]
Subject: [ms_access] MS-Access 2003 Bar coding


I would like to print a bar code of an alpha-numberic field for our
part numbers.  The field can contain spaces.  I want to create a bar
code that will read the entire field and trim the spaces.  I have tried
the trim command but the bar coded part number will be separated by the
space.  So it prints the bar code up to the space, then a gap, then
another bar code and our bar code reader will not read this.  Can
anyone tell me how I can get this to work?  TIA.






Yahoo! Groups Links













 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/ms_access/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/ms_access/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:[EMAIL PROTECTED] 
    mailto:[EMAIL PROTECTED]

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to