Results 1 to 3 of 3
  1. #1
    BobRoberts is offline Novice
    Windows 7 Access 2003
    Join Date
    Mar 2010
    Posts
    2

    Type declaration character does not match declared data type

    When I compile the following Access 2003 project, I get this error on the "Rs!" portion of the "rs!.NextID". The error is:



    Type declaration character does not match declared data type


    I want to point out that NextId in the testTable is defined as an Int

    The code portion is:

    Dim intNextTransId As Integer

    Set rs = New ADODB.Recordset
    rs.Open " SELECT * FROM dbo.testTable WHERE FunctionID = 'AR'", GetAdoConnectString("AR"), adOpenStatic, adLockOptimistic, adCmdText
    If rs.EOF Then
    intNextTransId = 1
    Else
    intNextTransId = rs!.NextID
    End If
    rs.Close

  2. #2
    BobRoberts is offline Novice
    Windows 7 Access 2003
    Join Date
    Mar 2010
    Posts
    2

    Stupid me

    Stupid me - didn't catch the "." after the "!".

  3. #3
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 Access 2007
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Sometimes we just work as a sounding wall. Are you ready to follow the link in my sig and mark this thread as Solved?

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

Similar Threads

  1. data type mis match
    By cowboy in forum Programming
    Replies: 3
    Last Post: 03-12-2010, 11:54 AM
  2. Attachment data type INSERT INTO not working
    By LouisLouis in forum Programming
    Replies: 0
    Last Post: 09-27-2009, 02:23 PM
  3. Type Mismatch - HELP!
    By jgelpi in forum Programming
    Replies: 3
    Last Post: 07-17-2009, 03:53 PM
  4. Number data type
    By BernardKane in forum Access
    Replies: 1
    Last Post: 11-11-2006, 08:19 PM
  5. query for data type number
    By oracle in forum Queries
    Replies: 1
    Last Post: 12-14-2005, 03:35 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