Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Date not populating correctly

0 views
Skip to first unread message

Debbie

unread,
Dec 11, 2009, 2:07:01 PM12/11/09
to
Hello all.

I am a newb at Visual Basic and am trying to create a module to pull in a
text file into MS Access. I have everything working perfectly with the
exception of the date column. The text file I am pulling in is an export of
a report that averages about 2,000 pages a day. I generally import several
days at a time and the data itself appears to be coming over just
fine...except the date. The date field appears once on every page of the
report and I want it reflected next to the data for that day in the report.

However, my table only reflects the most current date that I am importing.
For example today I imported the .txt file for 11/02 and 11/03 and only 11/03
reflected in the date colum of my table in access. I looked at the .txt file
and it appears to be fine. What am I missing. Here is a snap shot of the
date field code in Visual Basic. Thanks for your help.

'Get report date
If StrComp(Mid(strFileData, 2, 4), "DATE", vbBinaryCompare) = 0 Then
datReport = Mid(strFileData, 8, 10)
strDate = datReport
Line Input #intInFile, strFileData
End If


Nobody

unread,
Dec 13, 2009, 3:06:42 PM12/13/09
to
"Debbie" <Deb...@discussions.microsoft.com> wrote in message
news:5125B72C-D7E0-428C...@microsoft.com...

> Hello all.
>
> I am a newb at Visual Basic and am trying to create a module to pull in a
> text file into MS Access.

This group is for the stand alone product, VB6 or lower. For VBA, check
these groups depending on what office application you are using:

news://msnews.microsoft.com/microsoft.public.word.vba.general
news://msnews.microsoft.com/microsoft.public.office.developer.vba
news://msnews.microsoft.com/microsoft.public.outlook.program_vba
news://msnews.microsoft.com/microsoft.public.office.developer.outlook.vba
news://msnews.microsoft.com/microsoft.public.excel.programming
news://msnews.microsoft.com/microsoft.public.access.modulescoding
news://msnews.microsoft.com/microsoft.public.powerpoint

0 new messages