|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
type mismatch error
Quote:
What is wrong with my code? I'm getting a type mismatch error on the last line "Set rstFound = dbsTES.OpenRecordset(sqlStatement)" tblgeneralsection.siteid is numeric. and im running access 97. |
|
#2
|
|||
|
|||
|
I can't find any problems with your code, espically since you stated siteid is a number. Is there a chance that you are setting dbsTES to nothng somwhere else in your code.
S- |
|
#3
|
|||
|
|||
|
Only in the unload event. Nowhere else.
|
|
#4
|
|||
|
|||
|
Now is ths your real SQl Statement
sqlStatement = "SELECT * FROM tblGeneralSection WHERE tblGeneralSection.SiteID = 2" OR is this it sqlStatement = "SELECT * FROM tblGeneralSection WHERE tblGeneralSection.SiteID = txtSearchID.Text" "txtSearchID.Text" says I'm a text value Not numeric. If this is the case use txtSearchID S- |
|
#5
|
|||
|
|||
|
type mismatch error
Change Dim rstFound As Recordset
To Dim rstFound As DAO.Recordset and try it again. CG |
![]() |
| Viewing: ASP Free Forums > Database > Microsoft Access Help > type mismatch error |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|