S
Samantha
Hello,
can anyone tell me what's wrong with the following statements? I'm getting
the "Type mismatch" error.
Dim price As Double
Dim model, str As String
Dim db As Database
Dim rs As Recordset
Set db = CurrentDb
str = "SELECT [ML2400-PSMount].[Price] "
str = str & " FROM [ML2400-PSMount]"
str = str & " WHERE [ML2400-PSMount].[Options] = 'F-AC'"
Set rs = db.OpenRecordset(str)
price = rs("Price")
The error is at the "Set rs = db.OpenRecordset(str)" line.
Any help is very much appreciated. thank you very much.
can anyone tell me what's wrong with the following statements? I'm getting
the "Type mismatch" error.
Dim price As Double
Dim model, str As String
Dim db As Database
Dim rs As Recordset
Set db = CurrentDb
str = "SELECT [ML2400-PSMount].[Price] "
str = str & " FROM [ML2400-PSMount]"
str = str & " WHERE [ML2400-PSMount].[Options] = 'F-AC'"
Set rs = db.OpenRecordset(str)
price = rs("Price")
The error is at the "Set rs = db.OpenRecordset(str)" line.
Any help is very much appreciated. thank you very much.