crazy thing

wayne

wayne:
the file is the same i'll put here a real sample that i had to process in excel.
is the fact that the file is a .txt in ascii format anything to do with it??? I also have a excell macro that can process 65000 lines but each day goes by the original file gets 2000 to 10000 new lines, i'm going nuts here...
 

Attachments

L,

The file structure is definitely different. Not too different, but different.

I'll alter the s/w later today.

Wayne
 
L,

At least we're one step closer.

Your latest file (I guess the production one) has TABs in it.

I modified the code slightly to handle that.

Issues:

It seems that the same print job can have the same file multiple times.
Is this OK?

There are a lot of blank files reported. We can filter those out before
we insert them.

Will check back later.

btw,

Do you know how to use the Debugger? It would be an interesting
exercise to walk through the code.

Just put the line "Stop" (without the quotes) before the Open file
statement.

F8 will let you single-step
F5 will run to end
Ctrl-F9 will move the cursor to a line

Hover over a variable to see its value

Open the Immediate Window to type in commands like --> ? JobName
That will print the JobName out.

Wayne
 

Attachments

once again thanks 4 the help and the tips, i will try to use the debuger as you said and let you know how it works. keep up this great work.
 
w,
You got it, know it works just fine!!!! i'll try the debuger now.
you just saved me of a few hundred years of hard work. thanks again.
 
L,

Glad to hear it's all working OK.

If you have any problems fine-tuning it, I'll be glad to help.

See ya,
Wayne
 
wayne,
i'm try to find a code to disable the sistem confirmation message after running the sql delete command. is there a code i can use for that???
 
L,

You have two options:

1) Tools --> Options --> Uncheck Confirm Record Deletions

2) Use DoCmd.SetWarnings - Be sure to Turn them off - then back ON

Wayne
 
touche again!!
But i need your help once more.
on that same db i need a way to filter the data i thought on a form where i could select date account, etc and it give me the some of the print areas.
i try to do this on a query but when i put a date it stops the select distinct to the account. i used this code:"
SELECT DISTINCT jobs.Account, jobs.JobDate, Sum(jobs_details.PlottedArea) AS SomaDePlottedArea, Sum(jobs_details.UsedArea) AS SomaDeUsedArea
FROM jobs INNER JOIN jobs_details ON jobs.JobID = jobs_details.JobID
GROUP BY jobs.Account, jobs.JobDate
HAVING (((jobs.JobDate) Between #4/1/2005# And #3/1/2005#))
ORDER BY jobs.Account, jobs.JobDate;"

what am i doing wrong??? (again)...
 
L,

You're progressing quite nicely!

Remove the Distinct from your query. You don't want the Distinct account
numbers because the same account number can have many dates.

Wayne
 
w,
well, it's not exactly what i wanted, i need to select all records by mounth and some the plotted area for each account.
that's why i used the distinct, it works if i dont use dates, but when use dates it splits by day and i can't work around it.
 
forget it i figure it out :
"SELECT jobs.Account, Sum(jobs_details.PlottedArea) AS SomaDePlottedArea, Sum(jobs_details.UsedArea) AS SomaDeUsedArea
FROM jobs INNER JOIN jobs_details ON jobs.JobID = jobs_details.JobID
WHERE (((jobs.JobDate) Between #4/1/2005# And #4/2/2005#))
GROUP BY jobs.Account
ORDER BY jobs.Account;
"
this works very nice, i'm almost finish(i hope), thks anyway.
 

Users who are viewing this thread

Back
Top Bottom