Hi,
I'm using a local database to save check in and check out dates. I then need to check if a certain date is within those dates. It works fine when I start with the program with the database being empty, but if the table already contains dates, I'm unable to refer to those rows.
Error is "There is no row at position 0.", but if i open the table, there is a row at position 0
I'm using a local database to save check in and check out dates. I then need to check if a certain date is within those dates. It works fine when I start with the program with the database being empty, but if the table already contains dates, I'm unable to refer to those rows.
Error is "There is no row at position 0.", but if i open the table, there is a row at position 0
Code:
Dim all As Integer
all = Val(formDb.DsRoom.room1.Rows.Count)
If Not IsDBNull(formDb.DsRoom.room1) Then
If DateValue(dtpInHome.Text) >= formDb.DsRoom.room1.Rows(all).Item(2) Then
MsgBox("This date is booked")
End If
End If