473,763 Members | 9,161 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

word forms, access, and indefinite numbers of entries

Hey everyone,
I just started doin some work with access and vba, and don't know
much about it yet...any help would be much appreciated.

My goal is to create a form in word that can be filled out, printed,
and have its data be written to an accesss database. One of the
sections of this form is for a list of items which are purchased and
various cost and descriptive information about those items. I began
by creating text boxes for each piece of information and pulling data
out that way, however since there could be any number of listed items
in a given instance of the form, this won't really work.

So is there any reasonable way to allow a user to keep entering in
additional items into the form, and eventually have the database
updated to coincide with them.

Also, it may or may not be important but i'm also setting it up so
that when a user enters a product number in one text box information
is pulled out of the DB and added to the form containing the price and
some of the other descriptive data that goes along with it.

thanks
keith
Nov 13 '05 #1
7 2670
ka*******@smcm. edu (Kenneth_J) wrote in message news:<92******* *************** ****@posting.go ogle.com>...
Hey everyone,
I just started doin some work with access and vba, and don't know
much about it yet...any help would be much appreciated.

My goal is to create a form in word that can be filled out, printed,
and have its data be written to an accesss database. One of the
sections of this form is for a list of items which are purchased and
various cost and descriptive information about those items. I began
by creating text boxes for each piece of information and pulling data
out that way, however since there could be any number of listed items
in a given instance of the form, this won't really work.

So is there any reasonable way to allow a user to keep entering in
additional items into the form, and eventually have the database
updated to coincide with them.

Also, it may or may not be important but i'm also setting it up so
that when a user enters a product number in one text box information
is pulled out of the DB and added to the form containing the price and
some of the other descriptive data that goes along with it.

thanks
keith


Make life easy on yourself. Do it in Access. Going about it this way
is going to be hard in the long run, I think. You can't trap for
invalid entries etc... well, I guess you could using macros etc, but
why make your life so hard? Just use the functionality built into
Access and it will do most if not all of the work for you.
Nov 13 '05 #2
ka*******@smcm. edu (Kenneth_J) wrote in message news:<92******* *************** ****@posting.go ogle.com>...
Hey everyone,
I just started doin some work with access and vba, and don't know
much about it yet...any help would be much appreciated.

My goal is to create a form in word that can be filled out, printed,
and have its data be written to an accesss database. One of the
sections of this form is for a list of items which are purchased and
various cost and descriptive information about those items. I began
by creating text boxes for each piece of information and pulling data
out that way, however since there could be any number of listed items
in a given instance of the form, this won't really work.

So is there any reasonable way to allow a user to keep entering in
additional items into the form, and eventually have the database
updated to coincide with them.

Also, it may or may not be important but i'm also setting it up so
that when a user enters a product number in one text box information
is pulled out of the DB and added to the form containing the price and
some of the other descriptive data that goes along with it.

thanks
keith


If I remember correctly, MS Word has a table structure that displays
items in rows and columns. I think the Object Tree for Word allows
Access to reference the values in these Word tables using Automation.

James A. Fortune
Nov 13 '05 #3
> If I remember correctly, MS Word has a table structure that displays
items in rows and columns. I think the Object Tree for Word allows
Access to reference the values in these Word tables using Automation.

James A. Fortune


Yes, you can walk the tables collection and then the columns/rows of
that collection and write the data to a database, if you want...
Nov 13 '05 #4
pi********@hotm ail.com (Pieter Linden) wrote in message news:<bf******* *************** ****@posting.go ogle.com>...
If I remember correctly, MS Word has a table structure that displays
items in rows and columns. I think the Object Tree for Word allows
Access to reference the values in these Word tables using Automation.

James A. Fortune


Yes, you can walk the tables collection and then the columns/rows of
that collection and write the data to a database, if you want...


Pieter,

I'm not disagreeing with you. Access is the best way. I was trying
to answer the original question in case he HAD to use Word. Also,
Automation can go the other way. Access can have Word create
documents if needed.

James A. Fortune
Nov 13 '05 #5
Thanks for the help,
I am somewhat locked into using word unfortunately for this part of
the project...

one other thing i was having trouble with was programatically setting
the type of text form field, to date, number, calculate etc.

is this possible? ...specifically for calculate.

thanks,
keith
Nov 13 '05 #6
ka*******@smcm. edu (Kenneth_J) wrote in message news:<92******* *************** ****@posting.go ogle.com>...
Thanks for the help,
I am somewhat locked into using word unfortunately for this part of
the project...

one other thing i was having trouble with was programatically setting
the type of text form field, to date, number, calculate etc.

is this possible? ...specifically for calculate.

Keith,

part 1:
Ho boy. If you are going to do this, I would recommend naming your
form fields explicitly so that they correspond with the fields in your
database. Otherwise, getting the data into the database is going to
be a nightmare. If you're consistent, it should be quite easy.

Updating the database based on data in the forms... in real time? I
doubt it. Unless you did something fun like put all the forms to be
imported into a specific folder, wrote a routine in Access that ran on
a timer event, checked the folder for any files, imported them, and
then moved the successfully imported files into another folder.

Pulling data out of the database... Not sure. You might have to have
a macro do that. In a database form it's like doing a lookup. Maybe
you could pass an array of values and return a recordset of values
back to your form and populate that way. (Like I said, MUCH easier in
Access, but yes I know - not an option at the moment.) My guess would
be to include a macro that did all the looking up of information from
Access, pass it as a recordset, and away you go. Easier said than
done, though.

Programmaticall y setting the type of field on your form? Not that I
know of. You could copy and paste fields, I guess.
Nov 13 '05 #7
> My goal is to create a form in word that can be filled out, printed,
and have its data be written to an accesss database. One of the
sections of this form is for a list of items which are purchased and
various cost and descriptive information about those items. I began
by creating text boxes for each piece of information and pulling data
out that way, however since there could be any number of listed items
in a given instance of the form, this won't really work.

So is there any reasonable way to allow a user to keep entering in
additional items into the form, and eventually have the database
updated to coincide with them.

Also, it may or may not be important but i'm also setting it up so
that when a user enters a product number in one text box information
is pulled out of the DB and added to the form containing the price and
some of the other descriptive data that goes along with it.


Keith, you have really set yourself up a tough row to hoe. You are
essentially trying to get Word to be a database front end, and I think
even if you get the form to work, it will be a troublesome and erratic
child. Your job will be far easier if the data is entered into Access
and then ported to a Word document as needed for printing, emailing,
etc.

Instead of a real-time situation, you may have more luck by having the
user press a "save to database" button that then collects the data and
updates the appropriate record in Access. This doesn't solve your
lookup problem though.

Since you say you are new, perhaps if you explain why you think you
are stuck with Word, there may be an alternative option? I can think
of only one reason why it would be imperative to have the users use
Word to data enter, and that is if people were trying to pull data
from a database without a licensed copy of Access. (That, and the
other reason is because the boss says so... a harder issue to get
around!) If it's a licensing issue and the money is not there to buy
more licenses or a Developer Edition, then an intranet web page may be
the easier and more stable route.

However, I suggest experimenting with MS Query to see if it will solve
your problem, if you must do it this way.

Nicole
Nov 13 '05 #8

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

Similar topics

0
2413
by: Sabine Oebbecke | last post by:
Hi Experts! I have several forms and reports where controls get their values with 'Forms!MainForm!Control' or 'Forms!MainForm!Subform!Control' resp 'Forms!MainForm!Subform.Form!Control' which works without any problem in Acc97, 2000 and 2002, but now in Access 2003 there seem to be a problem with this. A user is working with my app, and he uses an Access 2002 MDE in an Access 2003 environment.
8
4826
by: dd_bdlm | last post by:
Hi I wonder if anyone can help? I have looked through prevous posts and cant find any answers that fit what I need to do. For reference I am using Access 97 and Word 97. I want to be able to have a client record open in a form and click a button and for that particular record to merge with a preformatted word doc. I have created a query that gives me all the fields I need (as they are over multiple tables) and I can successfully combine...
2
4818
by: Ray Todd Jr | last post by:
Could someone please look at this code and tell me what I am missing, please? The problem that is occuring is I am given an error (5922) that states "Word was unable to open the data source" As an overview, I have a form where you can put the criteria to select the data you want to print the forms by, the form has runreport button witht he following code. When I click on the button, I get the above mentioned error. If I remove the...
8
7517
by: Frost | last post by:
Hi All, I am a newbie i have written a c program on unix for line by line comparison for two files now could some one help on how i could do word by word comparison in case both lines have the same words but in jumbled order they should match and print only the dissimilar lines.The program also checks for multiple entries of the same line. Here file 2 converts to file 3 which is in the format of file1 and i compare file1 with file3.
2
3372
by: BerkshireGuy | last post by:
I want to open a word document from an Access form and transfer data from the Access form to the Word Document. For instance, if a user clicks an option box on my access form, I want to pass certain data to the next new line of a opened word doc. Here is what I tried, but doesnt seem to work: Dim objWord As Object Dim NewRow As Row
0
8667
southoz
by: southoz | last post by:
Good ay all , I'm fairly new to access(a little over 5 weeks now). Since I'v started I have picked up a lot of useful information from forums such as this and in doing so will share that information with others. I have seen many request for information on mail merging an how to send data to word documents this is something I have put together with the answers given by others and I hope this will help a few newbies , I know there are easier ways...
6
6773
by: nagar | last post by:
I need to get the list of Autocorrect entries in word. Is there a way to do it without connecting to Word? Is the list saved somewhere? If I need to connect to Word, how can I detect if it's installed on the user machine? Thanks. Andrea
209
8826
by: arnuld | last post by:
I searched the c.l.c archives provided by Google as Google Groups with "word input" as the key words and did not come up with anything good. C++ has std::string for taking a word as input from stdin. C takes input in 2 ways: 1) as a character, etchar() 2) as a whole line, fgets()
9
4256
by: DeZZar | last post by:
Hi all, Basically I want the data in an open form to merge with a word template and create a new document. So a user navigates to a particular records and presses a button "Produce Document" and access merges the current data with a template and up pops a "save as" box allowing the user to save their new document where ever.
0
9564
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9387
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
9938
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9823
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7368
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6643
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5406
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3528
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2794
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.