I have a recordset created from a dynamic string which returns start dates for a course.
I have a combo on a form that allows the user to select a course start date from the available dates.
some dates have peak pricing so the idea was that i would scan through the recordset and see if the date in the combo box appeared in the recordset.
not sure how to implement this.
I have :
Dim db As DAO.Database
Set db = CurrentDb
DtStartDate = DateValue(Me.CBStartDate.Text)
Dim RstPeakDates As DAO.Recordset
Set RstPeakDates = db.OpenRecordset(Mysqlstring)
If Not RstPeakDates.BOF And Not RstPeakDates.EOF Then
'instead search
With RstPeakDates
.MoveFirst
.FindFirst (CStr(DtStartDate)) 'this bit fails invalid argument
End With
End If
kind regards in advance.
Peter
I have a combo on a form that allows the user to select a course start date from the available dates.
some dates have peak pricing so the idea was that i would scan through the recordset and see if the date in the combo box appeared in the recordset.
not sure how to implement this.
I have :
Dim db As DAO.Database
Set db = CurrentDb
DtStartDate = DateValue(Me.CBStartDate.Text)
Dim RstPeakDates As DAO.Recordset
Set RstPeakDates = db.OpenRecordset(Mysqlstring)
If Not RstPeakDates.BOF And Not RstPeakDates.EOF Then
'instead search
With RstPeakDates
.MoveFirst
.FindFirst (CStr(DtStartDate)) 'this bit fails invalid argument
End With
End If
kind regards in advance.
Peter