Page 2 of 2 FirstFirst 12
Results 16 to 19 of 19
  1. #16
    jlgray0127 is offline Competent Performer
    Windows 2K Access 2000
    Join Date
    Oct 2011
    Location
    Central Illinois
    Posts
    187
    No sir, it's still maintaining the the enter data string input by the scanner. I just need the first seven characters. With MsgBox "[" & Left(Me.A1,7) & "]"


    I have a message box to pop up with the first 7 characters, but I need the text box to only retain the first 7 characters scanned, not the entire string.

  2. #17
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Let's try this again:
    Me.A1 = Left(Me.A1.Text,7)
    ...or maybe...
    Me.A1 = Left(Me.A1,7)

  3. #18
    jlgray0127 is offline Competent Performer
    Windows 2K Access 2000
    Join Date
    Oct 2011
    Location
    Central Illinois
    Posts
    187
    Both give me the same VB error...
    Run-Time '-217352567 (80020009)':
    the macro or function set to the BeforeUpdate or Validation Rule propery for this field is preventing the database from saving the data in the field.

  4. #19
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Good! That make more sense than when you have been getting. Let's try the AfterUpdate event with a condition:
    If Len(Me.A1) > 7 Then
    Me.A1 = Left(Me.A1,7)
    End If

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

Similar Threads

  1. Multiple forms or embedded sub-forms
    By Juicejam in forum Forms
    Replies: 2
    Last Post: 08-23-2011, 07:31 AM
  2. Scanning table for duplicate entry from VBA
    By Buakaw in forum Programming
    Replies: 6
    Last Post: 03-08-2011, 07:29 PM
  3. Replies: 1
    Last Post: 01-04-2011, 05:04 AM
  4. Search forms and sub forms
    By FadingAPE in forum Forms
    Replies: 1
    Last Post: 12-15-2010, 01:59 PM
  5. Replies: 4
    Last Post: 04-01-2009, 08:49 PM

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