'No value given' error with rs [RESOLVED]
Hey :wave:
I have this:
VB Code:
RS.Close
RS.Source = "Select * from Cars where Car_Registation = '" & lblCarReg.Caption & "'"
RS.Open
StartDate = RS.Fields("Car_DateDueOut")
EndDate = RS.Fields("Car_DateDueBack")
If (txtHireDateCommence.Text > StartDate And txtHireDateFinish.Text < EndDate) Then
MsgBox "The car is not available to hire out at the specified time. Please go back and select another car", vbExclamation + vbOKOnly, "Car not available"
Exit Sub
End If
Its giving me the error:
"No value given for one or more required parameters"
It then highlights RS.Open :ehh: I cant figure out what wrong with it. Any suggestions please?? Just ask if u need more information. Thanks
BIOSTALL
Re: 'No value given' error with rs
Hi.
There are generally two reasons for that error:
1. that you haven't supplied a value for an expected paramter;
2. you have misspelled a column name, and it thinks you mean a parameter. Is the r missing from Car_Registation deliberately or by mistake..?
Re: 'No value given' error with rs
Normally you need to add some parameters to the .OPEN - such as the CONNCTION and cursor type/location...
Do all your .OPEN statements look like this?
Re: 'No value given' error with rs
i set all the properties on form_Load().
Yeh, i was missing the 'R' *rolls eyes* Cheers :thumb:
BIOSTALL