export to text but only certain number of records

Same thing:

Starts with Public Function, then goes to StrPath, then Set Rs - ... and the error comes again.

Maybe this helps:
I have added an Option Explicit and then I get Variable not defined error on the first line of the Public Function.

I would like to solve this because it is bugging me and for the sport (remembering my days debuggin assembly, cobol, and fortran) but I think for the time being I am going to go down the manual route as our customer wants the file now.

I will continue to try what you ask if you haven't given up yet though.

Cheers!
 
Mailman,

Sometimes it takes an extra pair of eyes to spot the obvious. Thanks. When I asked him to ensure he changed the psudename TableOrQueryName shold have been done a step earlier.

Thanks

David
 
Set Rs = CurrentDb.OpenRecordset(May09Export)

Should be quoted if May09Export is a query or table name:

Set Rs = CurrentDb.OpenRecordset("May09Export")

Wow - I could swear I tried that earlier but I probably had something else not quite right - it worked now.

Thank you both of you - great piece of code and great solution - saved me a headache and makes me want to code again!
 
Glad to see we have another satified customer:)
 
On a side comment... making queries or tables that are named "May09Export" is not a prefered way of working as what will happen next month and the month after??
June09Export
July09Export
etc...
Jan10Export
Jan15Export

You have to manually change that everytime... Instead you should just have a table export and be done with it...
 

Users who are viewing this thread

Back
Top Bottom