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

Newb VBA Question

0 views
Skip to first unread message

Debbie

unread,
Jan 7, 2010, 7:10:01 PM1/7/10
to
Hi there.

I am not even sure how to ask this question. First of all....thank you for
looking at this.

I built a module in Access to pull in a text file (see below for example)
and populate a table. I am having a problem with the queue number (to the
left of the word queue below). I usually build and test a little at a time
and I have successfully built it to pull in the DATE, Function (in this case
Exceptions), and User ID. However, when I add code for the queue, the data
does not pull in (even though I get an import successful pop up). Here is my
code:

'get the Queue
If StrComp(Mid(strFileData, 11, 5), "Queue", vbBinaryCompare) = 0 Then
strQueue = Mid(strFileData, 6, 2)
Line Input #intInFile, strFileData

The text file

DATE12/31/2009 18:37:31 DAILY EXCEPTIONS OPERATOR
STATISTICS PAGE 1


------------------------------------------------------------------------------------------------------------------------------------


USER ID:xxxxx ITEMS TRACE ENDPT REASON COMP BAL ALPHA
FAXES IMAGE CONTROLS SECONDS IN QUEUE AVG. SPI


QUEUE MODE

11 Queue 41 1 1
1 651 16
12 Queue 21
1 175 8
13 Queue 1
1 27 27
16 Queue 4 4
1 8 2
18 Queue 1
1 13 13
21 Queue 10
1 70 7
24 Queue 1 1 1
1 45 45
96 Queue 7 7
5 54 8

-------------------------------------------------------------------------------------------------------------------
TOTALS: 86 13 2
12 1043 16

Ralph

unread,
Jan 7, 2010, 8:44:59 PM1/7/10
to
Debbie wrote:
> Hi there.
>
> I am not even sure how to ask this question. First of all....thank
> you for looking at this.
>
>
> 'get the Queue
> If StrComp(Mid(strFileData, 11, 5), "Queue", vbBinaryCompare) = 0
> Then strQueue = Mid(strFileData, 6, 2)
> Line Input #intInFile, strFileData
>

At first glance it looks like your count may be off, but hard to tell in
this context, and you have the test before the fetch ( I assume that is only
a typo).

But this newsgroup is for users of the VB6 product working with DirectX.
You need to post your question to a MSAccess newgroup. Perhaps ....
microsoft.public.access
microsoft.public.access.macros
You will be better served because that is where the MSAccess VBA people hang
out. (And besides this newsgroup is visited very infrequently.)

-ralph


0 new messages