how to save a record as a file?

  • Thread starter Thread starter Maryna
  • Start date Start date
M

Maryna

Hello!

Could you, please, help me with this task –

I have to add a button (or another control), which would let users save a
record as a separate file in a certain directory - the name of subfolders
will be different for each record, the name of saved file will be always the
same.

Thank you!
 
Tell us more info:

What type of file is needed? EXCEL? Text?

What is the design of the form on which the record is located? Does the
record contain a primary key field from the underlying record source query?
 
Is it possible to save a separate record as an Access file?
If not, Excel would be OK

Yes, the records in a form have a primary key
 
Is it possible to save a separate record as an Access file?
If not, Excel would be OK

Could you explain how this database will be used?

One separate .mdb database file (capable of holding 2 billion bytes, hundreds
of tables and forms)... *for a single table record*??

I'm sorry, Maryna, but I don't understand what this is intended to accomplish.
What's the context?
 
Could you explain how this database will be used?

One separate .mdb database file (capable of holding 2 billion bytes, hundreds
of tables and forms)... *for a single table record*??

I'm sorry, Maryna, but I don't understand what this is intended to accomplish.
What's the context?


I think she wants CSV file which is in the same time text file, can be
opened in Excel and it can be loaded back to Access? But first she
needs to make up her minds.

Regards,
Branislav Mihaljev, Microsoft Access MVP
 
We have electronic folders for each deed.
I want to save each record (an invoice) as a file for informational purpose,
It doesn’t require having them available for correction, only for reading.

Sorry for my unprofessional explanation of what I want to have as a result.

As I can see, it is impossible to save the records in a “view†as they are
in Access,
Is it correct?

thanks
 
Sounds like saving a printed copy might work. Have a look at File |
Print Preview ...

On my XP Pro SP2 we have Microsoft XPS Document Writer as one of the
available printers -- you could try printing the current form to that
printer, which saves to a file.


VBA code can easily pass arguments to the Print dialog if that will do
what you need.
 
Sounds like a 'printed' copy of the view would do what you are asking
for.

Try File | Print Preview ... when you are looking at one of the
invoices and see if printing only the current form would do what you
need.

On my XP Pro SP2 here at work we have Miscrosoft XPS Document Writer
as one of the available printers, and it 'prints' to a file.

VBA code can easily send parameters to the printer dialog if that's
the direction you want to go.
 
We have electronic folders for each deed.
I want to save each record (an invoice) as a file for informational purpose,
It doesn’t require having them available for correction, only for reading.

Sorry for my unprofessional explanation of what I want to have as a result.

As I can see, it is impossible to save the records in a “view” as they are
in Access,
Is it correct?

thanks

I think you may be confusing data STORAGE with data PRESENTATION. They are
different tasks!

I would suggest storing the information which goes into the invoice in
appropriate Tables in your database - probably several tables, take a look at
the Northwind sample database for an example.

You could then create a Form which (using queries and subforms and other
tools) would bring together all of the information about an individual
invoice. You can similarly create a Report which will let you view the data as
it would appear when printed (or go ahead and print it). You don't need to
"save it" as redundant data, or save it external to Access, unless you have
some other reason for doing so.

If you do want to save a separate, viewable, printable file containing a
snapshot of the content of the invoice, then I'd suggest creating an Access
Report and saving it as either a Microsoft Snapshot (.snp) file, using File...
Export from print preview mode; or get one of the several free or inexpensive
PDF file printers, and "print" the report to a .pdf file and save it.
 
Back
Top