Screen Scraping Macro in Access

V

Victoria

I hope I'm posting this in the right place. I'm using Access 2002 to track
orders. Someone in my company wrote a screen scraper for Access to go out to
different systems within the company and populate the fields in Access with
that information. We seem to have a lot of trouble with it. Is this
something that Access can handle? I realize the problem could be with the
way the code was written. I just want to see if anyone knows possible
reasons why this kind of macro may not work. Thank you.
 
D

Douglas J. Steele

Sorry, your question is far too vague. Certainly I've written screen
scrapers using Access.
 
V

Victoria

Sorry about being vague. It's good to know, though, that screen scrapers
work with Access. I pasted part of it below. The line with the *** is the
problem. I realize that this may still not be helpful as far as a resolution.
Thanks again.

em** This Sub is used to determine if CCD was Made/Missed
Rem*********************************************************

Sub CCD_Made(x As Integer, rst As Recordset)
Dim trm As Date, act As Date, CWD As Date, sts As String, chktrm As
String, chkact As String, made As String, missed As String

sts$ = rst.Fields("FMS Status").Value
***CWD = rst.Fields("CWD").Value
'chktrm$ = rst.Fields("TRM").Value
If chktrm$ = "" Then
trm = "01/19/00"
Else
trm = rst.Fields("TRM").Value
End If
'chkact$ = rst.Fields("Activation").Value
If chkact$ = "" Then
act = "01/01/00"
Else
act = rst.Fields("Activation").Value
End If
 
D

Douglas J. Steele

What is the problem?

Does the recordset have a field named CWD in it? Is it a Date? Might some of
the records not have a value in them? (The only data type than can accept a
Null value is a Variant)

Try

CWD = CDate(rst.Fields("CWD").Value)

or

CWD = CVDate(rst.Fields("CWD").Value)

If that doesn't work, try declaring CWD as a variant, rather than a date.
 
Top