Use Word document for Report Template

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I'm not sure if this is acutually something that's doable... I have a form
that I'd like to be autofilled from a table. I was able to convert the form
to a Word document. Can I use that Word document as the base of a report so
that the info from the table is automatically dumped into the form?
 
umm, what? are you using MS Access relational database software? (many
people post to Access newsgroups by mistake.)
if you are, not sure what you're trying to do. if you have data in a table,
and want to display the data in a form, then just bind the table to the
form, and bind the fields in the table to controls in the form. an easy way
is to select the table in the database window (but don't open it), and click
the AutoForm button on the toolbar. the wizard creates and opens a very
basic form that then you can then modify to suit your needs.

if you're trying to accomplish something else *with Access*, please post
back with a more specific explanation.

hth
 
Sorry, should have clarified what type of form I meant... I meant a form as
in a sheet of paper you usually fill out type of form, not a MS Access form.
One of our clerks has a form that is used for billing that she types in all
of the information and then retypes the information into the database. This
is obviously really redundant, so I was trying to streamline the process. I
thought the easiest way would be somehow make this paper form a MS Access
report. The form has to stay in the exact format it is in because it is a
government form. Is this a possibility?
 
well, i have no idea how to do something like that programatically, or if
it's even possible. but i did a small test with a *very* manual setup, as
follows:

i created a table with three fields:

tblReportTemplates
TempID (primary key, Byte data type)
ReportName (Text data type)
ReportTmp (OLE Object data type)

i opened a document in Word, highlighted the entire first page, and copied
it. then i opened tblReportTemplates in Access, in datasheet view, put the
cursor in the ReportTmp field, and pasted. (you may have to use Ctrl+V
rather than Paste from the toolbar or menu bar.)

then i opened a new report, in design view, and added a Bound Object Frame
control, sizing it to fit the "inside the margins" size of my Word document
(6x9, in my case). in the control's ControlSource, i used a DLookup() to get
the Word doc from tblReportTemplates, as

=DLookUp("[ReportTmp]","tblReportTemplates")

if you have more than one doc saved in the table, you set criteria on the
ReportID or ReportName field to pull a specific doc.

okay, now, all of that puts a copy of the word doc into your report. but
that was the easy part. now you can bind the report to the table that holds
the data you want to see. add bound controls to the report, positioning them
so the data displays in the right spot "on" the form in report preview.
(remember that you can delete the labels that are normally attached to
textbox controls.) sounds great, and it does work, but the tricky part is
that in design view you can't see the form - the OLE control is just blank
white. so it takes a lot of blind trial-and-error moving of controls to get
them positioned right.

when i did all the above, i was able to look at the report in preview mode,
and move through multiple one-page records, and it looked fine. it also
printed fine on my printer, but whether there would be some sort of
off-setting problems on different printers, i don't know.

at any rate, this is one solution. if you have the time and patience to set
it up once, then as long as it prints correctly - consistently - it could
save your clerk a lot of time over the long haul. but it sure isn't an
elegant solution, so i wouldn't go to all the trouble if you can find
something quicker and easier.

hth
 
Back
Top