Link to home
Start Free TrialLog in
Avatar of Sylvain
Sylvain

asked on

Connect a form and a database automatically

I am a French student intern in a construction company who charge me to create a database linked to pdf documents.
I would like to create a connection between pdf forms filled in to my MS Access database, is it possible without to much programming ?
If it is too complicated, maybe it is possible with forms on word or excel, but I prefer the pdf forms...

Hope to hearing from you soon

Kind Regards
Avatar of Ryan Chong
Ryan Chong
Flag of Singapore image

have you checked this out?

Buttons are most commonly associated with forms, but you can add them to any document. Buttons can open a file, play a sound or movie clip, submit data to a web server, and much more.

Setting action buttons in PDF forms
https://helpx.adobe.com/acrobat/using/setting-action-buttons-pdf-forms.html
Generally speaking, a database application (like Access) would link to an actual datasource (like an Access database, a SQL Server database, etc). A PDF form would not be considered a datasource, since it would contain information pertaining to a specific item only.

I could perhaps see you parsing information from that PDF file and storing it in a normalized database structure. Note that VBA/Access does not have any methods to do this, however, You'd need a 3rd party library, like Adobe or one of the many PDF reader libraries. If you use a 3rd party library, be sure that it is intended to work in the Access environment. Not all of those types of libraries will work with Access.
If you want to use Access with no third party tools or code, an option would be to create a form in Access for data entry (you can design it with the same general layout as your PDF form), and the underlying table(s) to store the data.  Then create an Access report to preview, print or export the data.  Access's print preview ribbon has a built in Export to PDF option, or alternatively, you could use a single line of code:

DoCmd.OutputTo acOutputReport, "MyReportName", acFormatPDF, "C:\SomeFolder\MyPDFFile.pdf", True

Open in new window


Not as robust as what you are asking for (a direct link to a PDF file), but simple and fast to build, and possibly suitable for your purposes.
Avatar of Sylvain
Sylvain

ASKER

Hi folks, and thank you for your quick replies. To pick up on your answers, I have several further questions :

- What kind of softwares / applications can I use as a 3rd party library which works well with access?
- mbizup, I am not sure to understand your explanation. I just want to extract data from a pdf form and then insert it in my MS Access database. I do not want to expot data from the DB to the pdf form. Therefore, I do not understand why I should create the form on Access and then export it. I would rather do my form on directly Word or on a PDF application.

Thanks for your help

Sylvain
Sylvain,

Your overall goal was not clear to me in your original question, but based on your reply, the suggestion I posted clearly won’t work.
I just want to extract data from a pdf form and then insert it in my MS Access database.
Then you'll need 3rd party tools to do this. VBA has no native methods.
Avatar of Sylvain

ASKER

So what are the relevant software I can use to establish the link between the pdf form and the MS Access database ? Is it way more complicated than converting the pdf form in a .txt file and then importing it in the database?
The process, if not automated, should be fast and easy to achieve for each new form...
There's lots of them. I haven't used any, so couldn't recommend one over another. Here's one example:

Able2Extract: https://www.investintech.com/prod_a2e.htm

You can search for "pdf extract vba" for lots of hits ...
To interact with a pdf form, you would need the full version of Adobe on EVERY computer that needs the functionality.  I have used Able2Extract and I don't believe it is what you are looking for.  If you use Adobe, you can interact with the data directly.  If you use a scanning tool such as Able2Extract, the software has to scan the file and save it as excel or word or something you can read with Access.  The document created by the scanning tool will include all the form labels and will be laid out exactly as the form looks so it will be a lot more work to pick out the data.  You can do it though.  The key is that EVERY computer that needs to import he documents requires the 3rd party tool.
Avatar of Sylvain

ASKER

Aftr several research I succeed in exctracting the data from the pdf form to an excel files containing multiple tables. Now I would like to export the data from the excel file without opening MS ACCESS. Furthermore, when I erase the EXCEL file, it shouldn't erase the data in the ACCESS database (that is why I do not want to link the Excel file ans the Access database). Is it possible with a VBA macro written in the Excel file?

Kind Regards
You haven't told us how you are extracting the data so I'll have to guess that you have written something in Excel.  Rather than importing the data to the spreadsheet, you can just as easily append it to an Access table using ADO or DAO.
Agree with Pat - just import into Access using standard methods.  I find it easiest to create a linked table to the Excel file, and then create an import routine that examines that linked data and imports it into the correct tables.
This question needs an answer!
Become an EE member today
7 DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform.
View membership options
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.