Automatic Input into Forms

R

rblivewire

I need some ideas on how to automatically input information into text
boxes or dropdown menus by either macros or vb.

Maybe take some information off of an excel sheet or word document and
input it onto the already created form. Is this possible?
 
S

strive4peace

in code behind the form:

me.controlname = "textvalue"
me.controlname = #1/1/07#
me.controlname = 99

Can you explain a bit more about what you are trying to do

Warm Regards,
Crystal
*
:) have an awesome day :)
*
MVP Access
Remote Programming and Training
strive4peace2006 at yahoo.com
*
 
R

rblivewire

I am basically trying to create a separate form, outside of access
(either in word or excel), and when a user fills this out, i want to
take this information that a user inputs and put it into my already
made database. It would need to be put into a form I created that
needs to be filled in. So, the information needs to be put from the
outside word or excel document into the form in Access. Does this make
sense?
 
L

Larry Linson

I am basically trying to create a separate form, outside of access
(either in word or excel), and when a user fills this out, i want to
take this information that a user inputs and put it into my already
made database. It would need to be put into a form I created that
needs to be filled in. So, the information needs to be put from the
outside word or excel document into the form in Access. Does this make
sense?

I'm not sure whether it makes sense or not... what's the purpose of putting
the data into Controls in a Form, as opposed to storing it directly in a
Table? If you are going to put it into a Form, what's the purpose of putting
it first into an MSForms Form in Excel or Word? Are you using this to
automate testing of your database application -- would seem that the data
would be stored somewhere if that were the case, instead of being entered
into an external Form.

The "How" you describe is almost certainly possible, though. It's the "makes
sense" part that may be a puzzler.

Larry Linson
Microsoft Access MVP
 
R

rblivewire

The information will be in the table, because the form in Access is
connected to the table. It is an access problem, where I do not want
users to access the database, but instead use an external form. Then
take the info from the external form and put it in the database.
 
L

Larry Linson

The information will be in the table, because
the form in Access is connected to the table.
It is an access problem, where I do not want
users to access the database, but instead use
an external form. Then take the info from the
external form and put it in the database.

You have told me, again, how you want to do something, but not exactly what
you want to do, and what the purpose would be for doing what you want. It is
entirely possible that someone could offer a suggestion to accomplish your
purpose that is simpler and easier than your proposed solution -- if only we
knew what your purpose _is_.

Let me ask , one more time: "Help me understand-- why do you want to put the
data into an Access form from the external Form, rather than storing it
directly into the Access table from the external Form? Sorry I am so dense,
but it is not obvious to me what you are trying to accomplish."

What do you expect to gain by using an external Form for data entry? What
is it that you are trying to protect? You seem perfectly happy to allow
users to add Records to your Database via an external Form.

But, for using the external Form, the answer is you will use Data Access
Objects or ActiveX Data Objects code in Visual Basic for Applications in
either Excel or Word to write the data entered into the external Form by the
user into the Table in the Access/Jet Database. You could do something
similar with a second Access database containing the entry Form with
restrictions on the functionality that Form allowed, linked to the actual
Tables in the database you want to protect.

To insert the data from an MS Form in Excel or Word into an Access Form,
you'd use COM Automation to control Access from Excel or Word. That's one
to Google, or to get and study an advanced self-study book such as "Access
Developer's Handbook" by Litwin, Getz, et al, from Sybex for the version of
Access you are using.

I don't do VBA in Excel or Word... the VBA itself is the same, but the
Object Model is very different between Databases, Spreadsheets, and Word
Processors... nor do I use MS Forms with Access (and would view with some
alarm anyone so rash as to do so), so I'm not a good person to advise on the
details of the approach you seem determined to use.

Larry Linson
Microsoft Access MVP
 
D

DbMstr

I need some ideas on how to automatically input information into text
boxes or dropdown menus by either macros or vb.

Maybe take some information off of an excel sheet or word document and
input it onto the already created form. Is this possible?

I never recommend that external form data be 'dumped' directly into
your main Access Db tables without an interim protection layer. Many
bad things can occur if you do.

I always first put info from external data collections into another
Db(Access or?) and run some validity checks before moving that data
into my main database tables. Almost any kind of data collection form
can be used where you can define fields and formats that are equal to
or less than your field definitions. Of course it is ideal if the user
has no access to these controls and make unwanted changes. I use a lot
of fill-in PDF forms since they can be freely distributed or placed on
a website and you have no worries about what programs or versions your
user has.

You have nothing useful datawise in a form that is not first placed
into a table.
 
R

rblivewire

I have a "form" made in excel where users input data
going vertical (read like a piece of paper). I need to put the
information from some of the cells into Access. I have a button on a
form in Access where if the user presses it, it should automatically
takes the information from the "form" in excel and puts it in the form
in Access.

Ex. (Excel Form)
A B C
1 Name XXX
2 Addr. XXX
3 Phone XXX


(Access Form)


Name XXX
Addr. XXX
Phone XXX


I want to take the XXX above and put it in the 3 text boxes that
correspond to its particular cell on the Access form at the press of
that button. Any coding would be helpful to do this.

I need to do this due to issues where it is too complicated for users
at different locations to open the database from our location. So if I
can make a generic form for all locations, it is easier.
 
J

John Vinson

I have a button on a
form in Access where if the user presses it, it should automatically
takes the information from the "form" in excel and puts it in the form
in Access.

A Form in Access is NOT a data storage repository.

It's a tool that lets you put data into tables.

Do you want the data from Excel to end up in an Access Table?
If not, why is Access involved at all?
If so, why not store the data directly from Excel into the Table,
bypassing the Access Form?

John W. Vinson[MVP]
 
Top