473,508 Members | 2,351 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Saving text fields from Word templates into Access DB?

We have an access DB that 2 input people use to tracking incoming
patients. There is a form for them to do this but they find it
confusing to use (it's plainly laid out, no one else complains about
it). Management has decided that they want me to link 15 of our
templates so when a template is opened and text entered into one of the
text fields it will automatically be entered into the database.

First of all, is this possible?

Secondly, how would I do this? A link or book reference is good if
you're not up to explaining it. :)

Any help is appreciated.

May 13 '06 #1
1 2687
> We have an access DB that 2 input people use to tracking incoming
patients. There is a form for them to do this but they find it
confusing to use (it's plainly laid out, no one else complains about
it).
....You mean 2 forms in Access, right? Or forms in Word?
Management has decided that they want me to link 15 of our
templates so when a template is opened and text entered into one of the
text fields it will automatically be entered into the database.

First of all, is this possible?
Template - as in Word Template, right? I think it is possible using
VBA.
http://forums.microsoft.com/MSDN/Sho...69217&SiteID=1
example describes a little bit. The bottom line is - if you get to read
the entry fields in your Word document using VBA, the rest is pretty
simple. Remember, you will have to add a reference to Microsoft Active
X Data Objects 2/2.1/2.5 or other to connect to your Access Database.
Secondly, how would I do this? A link or book reference is good if
you're not up to explaining it. :)

Any help is appreciated.


Lets say your Word document has a form text field that you name it
Text1, in your Document_Close() event, you will write something like
this to access the value in the text box:
MsgBox Me.FormFields.Item("Text1").Result

Using this concept, you could create a user-form to save data to Access
database.

Steps involved would be:
* try to create a simple macro or user form that will react to user's
need
* write code with actions (like clicking of a user-form's button, or
closing of the document) that will read information from the Word
document's form text field
* take this information and validate information, if everything is as
desired, open a connection to Access and insert the information in
table(s)
* Close the connection and finish the action the user invoked. Make
sure there is a graceful exit (probably logs created) if the
code/macro/module is written for Document_Close() event

Hope this helps.

Chirag Shukla.

May 13 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1531
by: Sudipto Sen | last post by:
================== Problem Description ================== Following code is for 1. Load a Word Template called CustomerInfo1.dot 2. CustomerInfo1.dot is a normal Word Template with Form fields...
8
3487
by: Mike MacSween | last post by:
tblCourses one to many to tblEvents. A course may have an intro workshop (a type of event), a mid course workshop, a final exam. Or any combination. Or something different in the future. At...
2
4573
by: Russell the Muscle | last post by:
Where I work we have Thousands of Word Templates that when opened loads data form a SQL Server database. Because we have so many templates I created a access database so we can easly search though...
18
3766
by: TORQUE | last post by:
Hi, Im wondering if anyone can help me with a problem. I have a form with more than 50 unbound fields. Some of the fields will be blank from time to time. This seems to be where im having...
12
10635
by: Dixie | last post by:
Is there a way to shell to Microsoft Word from Access and load a specific template - using VBA? dixie
1
1865
by: uarana | last post by:
Hi All, I've been working with Acess for a little while now but have never had to do a thing of such sort. Any help would be appreciate. Thanks Problem: A report is sent to users to fill...
10
2887
by: HenHouse | last post by:
Hi folks; Hey wow! First post! Hope it bears fruit... Anyway, I've been teaching myself Access since March by writing an event/contact management database for the firm I work for. It's...
16
11036
by: Neil | last post by:
I posted a few days ago that it seems to me that the Access 2007 rich text feature does not support: a) full text justification; b) programmatic manipulation. I was hoping that someone might...
3
4985
by: brat33 | last post by:
I am trying to use a command button to automate a process for creating mailing labels from a query in Access 2007, going into word 2007. Current code looks like the following: 'Start MS Word Dim...
0
7225
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7123
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7382
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7495
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
4707
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3193
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3181
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1556
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
418
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.