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