You got it in one. The Index property is only available
with a table type recordset (dbOpenTable).
That article assumes the table is local to the front end mdb
file. This would make a lot of sense since you would not
want to use a back end table in case two users were running
the report at the same time.
If this a split, but single user application, you could open
the backend database (using OpenDatabase) and use that db
object to open a table type recordset.
Since this is a temporary table, you may want to avoid the
bloat issues by either placing the table in a temporary
database:
http://www.granite.ab.ca/access/temptables.htm
or by using an approach that uses arrays instead of a
temporary table
http://www.mvps.org/access/reports/rpt0013.htm
--
Marsh
MVP [MS Access]
Randall Arnold wrote:
That got me to the next error! Which was:
Runtime error '3251': Operation is not supported for this type of object
on the line:
grpPages.Index = "Primary Key"
Maybe not available with a Dynaset? Ay yi yi...
Thanks for your continued help, Marsh. I'll check the MSKB again.
That's it.
dbOpenTable only applies to tables in the db object. Using
dbOpenDynaset should get you past this issue.
Randall Arnold wrote:
It's a linked table, but that point is moot since the Set command
isn't
even
working (no error on Dim statement for DB). I tried CurrentDB and got
the
same result. I'll try your other suggestions next.
Hmmm? Grasping at straws now.
Is Backhoe Queue a local table or is it a linked table or
query?
Does dbOpenDynaset help?
Does using
Set db = CurrentDb()
instead of
Set db = DbEngin(0)(0)
make a difference?
Randall Arnold wrote:
Yep, version 3.6.
"Marshall Barton" wrote
Do you have reference to the DAO library?
Randall Arnold wrote:
May be a moot point after all-- Access 2003 blows up on one line
of
the
code
MS provides in the KB article.
At this line,
Set grpPages = DB.OpenRecordset("Backhoe Queue", dbOpenTable)
The error "Runtime error '3219': Invalid Operation"
Checking watched values show that the database variable DB never
gets
assigned, even though the following code is included:
Set DB = DBEngine.Workspaces(0).Databases(0)
Looks like I need to do some further research... : (
"Marshall Barton" wrote
That may be, but using code to rip a report into pieces is a
nontrivial issue that will require some third party product
such as a good pdf driver or something like that.
Just trying to keep the destination in sight, so you don't
waste time going sown a dead end toute.
Randall Arnold wrote:
Automation code may be the next step. That's actually more my
forte
so
I'm
sure I'll make that part work.
faxing in code. If it's going to be a manual paper fax,
then the pages per group would be the next step.
Randall Arnold wrote:
Thanks, I'll check that one out.
The faxing isn't the issue; just the page numbering. The
client
knows
to
separate the report into groups of faxable sheets per vendor.
Randall Arnold
Here's an article about getting the pages per group:
http://support.microsoft.com/default.aspx?scid=kb;en-us;306127&Product=acc97
but I don't think any of this is going to help you fax
pieces of a report to separate people. Try working out the
faxing issues before you spend too much time working on the
report.