Reading Tables and Printing Lines

G

Guest

In Access 2002, I have defined a table, tblAlumnus, I am trying to write a
module which will read sequentially through tblAlumnus, access the data by
the field names I have assigned to it and print lines in a report.

Doing this through queries is getting way too complicated.

How about if I use the module to output records and then run those into a
report?

Which is easier? The latter would allow me to sort differently, which would
be good.

Thanks for any help.
 
G

Guest

You could output the records to a temp table. Create a query on that table
and a report on that query or just a report based on the table.

One problem you may encounter is if you don't always output the same fields.
You could get round that by including all fields in your temp table and only
populating/updating the fields you choose. You may then need to use unbound
fields in your report and set their source at runtime.

Another way that may work for you is to have a custom query and set its SQL
at runtime. Again, if you output different fields at different times you will
need to use unbound fields in your report and set their source at runtime.

Steve
 
J

John W. Vinson

In Access 2002, I have defined a table, tblAlumnus, I am trying to write a
module which will read sequentially through tblAlumnus, access the data by
the field names I have assigned to it and print lines in a report.

Doing this through queries is getting way too complicated.

How about if I use the module to output records and then run those into a
report?

Which is easier? The latter would allow me to sort differently, which would
be good.

Thanks for any help.

Doing it with code will be much HARDER than doing it in a query. Do the
formatting and layout in the report design, and do the record and field
selection in a query! What specific difficulties are you having? What's the
structuer of your table, and what do you mean by "access the data by the field
names" (i.e. how ELSE could you access the data other than by its fieldnames)?

John W. Vinson [MVP]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top