Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Type declaration character does not match declared data type

Status
Not open for further replies.

Tranz2

Programmer
Jan 2, 2003
18
US
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
 
Stupid me - didn't catch the "." after the "!".
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top