![]() | |
![]() |
| | Thread Tools | Search this Thread | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I'm new. I have some simple code that is returning data mismatch errors. I am trying to pull a single sum out of a query, save as variable intDCT, and insert intDCT into a selection query. The code is: Dim SQLtot As String Dim intDCT As Integer intDCT = "SELECT DISTINCTROW Sum(tMTH_DLRCT.DEALERCT) AS [Sum Of DEALERCT]" & _ "FROM tMTH_DLRCT;" SQLtot = "UPDATE TPP2 SET TPP2.DEALERCT ='" & intDCT & "';" It returns an immediate error 13, data mismatch on the intDCT line. I have tried Integer, Long, Number, nothing works. What am I doing wrong? Thanks in advance for your help! -- willem |
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
| |