Trying to use DateDIff and or ISDate

  • Thread starter Thread starter Cien
  • Start date Start date
C

Cien

Guest
I am using Vb.net. I need to look a records in a random access file that are as old(or past due) as the number I input in my textbox and then display the records in a listbox.

Here is the code I have so far:

Visual Basic:
Dim intNum as integer
Dim strDate as date
Dim intDays as integer

intDays = Val(me.textbox.text)

FileOpen

Do until EOF
FileGet(1, udtData.Date, 1)
strDate = udtData.Date
intNum = DateDiff(Interval , strDate, today)
If intNum = intDays then
    me.listbox.items.add(udtData.Name, udtData.Date)
End if
Loop

FileClose
 
Last edited by a moderator:
Getting on error on line:

strDate = udtData.Date


I don't have it in front of me now but I think its a "type of string" error message.
 
Back
Top