Results 1 to 5 of 5
  1. #1
    CementCarver's Avatar
    CementCarver is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Feb 2013
    Location
    Canada
    Posts
    231

    Run-time Error 3163 - Field Too Small


    After reviewing my debug statement, to see which records are being inserted into the table, and after checking whether the field types for each three are large enough to accommodate the incoming values, I still get the run-time error 3163 field too small.

    Although the record has already been successfully added to the table, the next line causes this error. The three fields in question are:
    MEMBER_ID = long integer
    BUSINESS NAME = text 255
    PLICENSE = long integer

    Knowing that it may be the line above causing the error, I cannot figure out why this error is appearing when I know that the record has already been created. This is so frustrating.........

    The following code module in question is:

    Private Sub AddPacker(rstPacker As Recordset, _
    strBUSINESS_NAME As String)

    Dim Grower_lnk As Integer
    Dim PackerLicence As Integer


    If Me.Check_Packer = 0 Then
    MsgBox "Please Select Packer Check Box before Proceeding"
    ElseIf IsNull(DLookup("[Business Name]", "FULLPACKER", "[Business Name] = '" & strBUSINESS_NAME & "'")) Then
    PackerLicence = DMax("[PLICENCE]", "FULLPACKER")
    PackerLicence = PackerLicence + 1
    Grower_lnk = Forms!BUSINESS_MAIN!MEMBER_ID
    Debug.Print "Incoming Values = " & strBUSINESS_NAME & " and " & PackerLicence & " and " & Grower_lnk
    'Insert packer record
    CurrentDb.Execute "INSERT INTO fullpacker([Business Name], PLicence, Member_ID) VALUES('" & strBUSINESS_NAME & "', '" & PackerLicence & "', '" & Grower_lnk & "')"
    'Open the form based on where clause
    DoCmd.OpenForm "frm_CREATE_PACKER", , , "[Business Name]='" & strBUSINESS_NAME & "'"
    MsgBox "New Packer Record Has Been Created for: " & strBUSINESS_NAME
    Else
    MsgBox "Packer Record for: " & strBUSINESS_NAME & " already exists, Please proceed with edit session.", vbCritical
    End If
    End Sub

  2. #2
    SteveH2508 is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Sep 2010
    Location
    Chelsea, London, England
    Posts
    117
    Dim Grower_lnk As Integer
    Dim PackerLicence As Integer

    whereas your fields are Long Integers

    Change the declaration to

    Dim Grower_lnk As Long
    Dim PackerLicence As Long

  3. #3
    CementCarver's Avatar
    CementCarver is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Feb 2013
    Location
    Canada
    Posts
    231
    Thanks SteveH2508, I'll give that a try.

    CementCarver

  4. #4
    CementCarver's Avatar
    CementCarver is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Feb 2013
    Location
    Canada
    Posts
    231
    SteveH2508,

    I get the same error......CementCarver

  5. #5
    CementCarver's Avatar
    CementCarver is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Feb 2013
    Location
    Canada
    Posts
    231
    Solved. The solution had nothing to do with the code, rather it was a flawed record source.

    CC

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

Similar Threads

  1. decimal field's precision too small
    By Newby in forum Access
    Replies: 3
    Last Post: 02-05-2013, 12:13 PM
  2. Replies: 1
    Last Post: 12-01-2012, 12:44 PM
  3. Replies: 5
    Last Post: 06-09-2012, 12:37 PM
  4. Field Is Too Small Issue
    By netchie in forum Forms
    Replies: 1
    Last Post: 09-21-2011, 12:45 PM
  5. Replies: 1
    Last Post: 07-14-2010, 11:55 PM

Tags for this Thread

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