Results 1 to 6 of 6
  1. #1
    johnnyflames is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jun 2012
    Location
    Michigan
    Posts
    6

    2113 Error happening from Access 2003 to 2010

    Hello Everyone,


    I'm not a pro at Access by no means. I'm just filling in for the "Access" guy that left the company.
    I have a .mdb that works fine in Access 2003. I get a 2113 error, "The value you entered isn't valid for this field.", in Access 2010.
    This error happens when I do the following...
    1. Select an item from a combo box. (data from another table)
    2. Next, click a button to open another form.
    3. This action should take the data from the combo box, then query a table for info that will be displayed in the next form.


    Like I said earlier, it works great in 2003.
    I've been told that it may be a reference issue.
    Below is my References.

    Click image for larger version. 

Name:	references.jpg 
Views:	10 
Size:	73.9 KB 
ID:	8011

    I'm at a loss.

    Thank you for any help with this,
    John

  2. #2
    Robeen is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    Mar 2011
    Location
    Tulsa, Oklahoma.
    Posts
    1,596
    1. What kind of value is the data in the combo Box?
    2. Did you try Googling the exact error message? I was on a contract where they changed the version of Access [from 2007 to 2008] on me in midstream and there were a few things that 'broke' [I remember one of them was a date 'Format()' function that worked fine in 2007 . . .
    I also remember getting from the Microsoft site [msdn] some suggestions on how to fix the problems.

    Try google with the exact error message.

  3. #3
    johnnyflames is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jun 2012
    Location
    Michigan
    Posts
    6
    Thanks for the quick reply.
    The combo box displays a "Text" datatype. (i.e. "ABCD-1234-ABC"). This value is an unique ID (primary key) in a table.
    Yes, I have Googled the exact error message. Most of the results refer to trying to enter "Text" data into a numeric field.
    I have checked and that's not the case.

  4. #4
    orange's Avatar
    orange is online now Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,726
    Can you show us some sample code for your steps 2 and 3? Show us the query sql for the query mentioned in step 2 of your firs tpost.

  5. #5
    johnnyflames is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jun 2012
    Location
    Michigan
    Posts
    6
    Here's the code requested.
    When the combo box item is selected a button is clicked then the below code.

    Code:
    Private Sub Continue_Click()
    On Error GoTo Err_Continue_Click
    
        If Not IsNull(Forms![CustomerLookupScreen01]![ID]) Then
            DoCmd.OpenForm "CustomerLookupScreen02"
            Forms![CustomerLookupScreen02]![ID] = Forms![CustomerLookupScreen01]![ID]
            Forms![CustomerLookupScreen01].SetFocus
            DoCmd.Minimize
            Forms![CustomerLookupScreen02].SetFocus
    
        End If
    
    Exit_Continue_Click:
        Exit Sub
    
    Err_Continue_Click:
        MsgBox Err.Description & ": " & Err.Number
        Resume Exit_Continue_Click
       
     End Sub
    The query to fill the combo box is ...

    Row Source:
    Code:
    SELECT [CUST].[ID], [CUST].[STNO], [CUST].[STREET] FROM [CUST] ORDER BY [ID];
    where 'CUST' is the customer table.

    Row Source Type: Table/Query
    Bound Column: 1

  6. #6
    johnnyflames is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jun 2012
    Location
    Michigan
    Posts
    6
    Well, I'm narrowing it down.
    I can run without error in Access 2007.
    I checked the References within VB editor and the only differences I see is 2010 has Microsoft Access 14.0 Object Library where 2007 has 12.0 Object Library.
    Every other reference is the same.

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

Similar Threads

  1. Replies: 0
    Last Post: 03-14-2012, 12:21 PM
  2. Access 2003 and 2010
    By Rick West in forum Access
    Replies: 1
    Last Post: 03-05-2012, 07:36 PM
  3. Replies: 2
    Last Post: 11-04-2011, 02:45 AM
  4. access 2010 to 2003 conversion
    By Mclaren in forum Access
    Replies: 2
    Last Post: 08-19-2011, 03:53 AM
  5. Replies: 1
    Last Post: 06-23-2011, 07:19 AM

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