thewiseguy
Registered User.
- Local time
- Today, 21:23
- Joined
- Apr 14, 2004
- Messages
- 56
something really odd happened and i have no idea why...
i had some vba with some public recordsets:
later on i have:
everything works fine, but then one day my db went corrupt - crapola!
i started a new one and imported all the forms, tables and queries across and things seemed to be looking good except the above line of code now always brought up the error message RUNTIME ERROR '13' - TYPE MISMATCH. never happened before and couldn't really see what's wrong with it.
then, by chance i tried something and everything works again but i do not know why. when i initially declare the recordsets, i stick in a fake one after rstfinal that never gets used or referenced:
somehow, rstblob sitting between rstfinal and the 'As Recordset' bit seems to make it all run smoothly. now if it ain't broke, don't fix it, so i'll leave it there but i would like to know if there is an explanation...
i had some vba with some public recordsets:
Code:
Public rststore, rsttemp, rstfinal As Recordset
later on i have:
Code:
Set rstfinal = CurrentDb.OpenRecordset("tblSTOREFINAL")
everything works fine, but then one day my db went corrupt - crapola!
i started a new one and imported all the forms, tables and queries across and things seemed to be looking good except the above line of code now always brought up the error message RUNTIME ERROR '13' - TYPE MISMATCH. never happened before and couldn't really see what's wrong with it.
then, by chance i tried something and everything works again but i do not know why. when i initially declare the recordsets, i stick in a fake one after rstfinal that never gets used or referenced:
Code:
Public rststore, rsttemp, rstfinal, rstblob As Recordset
somehow, rstblob sitting between rstfinal and the 'As Recordset' bit seems to make it all run smoothly. now if it ain't broke, don't fix it, so i'll leave it there but i would like to know if there is an explanation...