Hi!
I'm having a 'type mismatch' error in the following SQL statement in my VB code...
stSQL = "Select [AmountPerHour] from PayRates where [Pay_Rate_ID] = 'marking' And [Rate_Date] = Me![Rate_Date] "
After debugging I can see that Rate_Date holds the value 9/09/2004 as does Me![Rate_Date] but it still has this error...
Does anyone have any idea what might be the problem? I tried writing this in SQL view of a query and it seems to work only when I do Rate_Date with a value of 9/09/04 instead of 2004 although the table has it in the above form (2004)...
Thank you!
Krys
I'm having a 'type mismatch' error in the following SQL statement in my VB code...
stSQL = "Select [AmountPerHour] from PayRates where [Pay_Rate_ID] = 'marking' And [Rate_Date] = Me![Rate_Date] "
After debugging I can see that Rate_Date holds the value 9/09/2004 as does Me![Rate_Date] but it still has this error...
Does anyone have any idea what might be the problem? I tried writing this in SQL view of a query and it seems to work only when I do Rate_Date with a value of 9/09/04 instead of 2004 although the table has it in the above form (2004)...
Thank you!
Krys