Using Macro in Forms

G

Guest

I have created two tables that I have now put into a Form. I have also
created a Macro that should update another table once run. The Macro won't
update the table unless I close the Form. I am not sure I am using the
correct property. Any suggestions
 
N

Nikos Yannacopoulos

This is too general to be answered, we don't get the picture! More
details please, what exactly is the macro supposed to do, and what are
the actions and their arguments in it?

Nikos
 
G

Guest

I have a table that I am logging in projects. Each project will be assigned a
sequential number. The "number listing" is stored on another table. When I am
in my projects table, I have set-up a macro that when I click on the "Number
Table" it should automatically populate the project name to the Number Table
which I can then assign a number. The project name doesn't populate until I
close both tables. Does that make sense? Looking for any suggestions. Thanks!
 
N

Nikos Yannacopoulos

No, I'm afraid it doesn't make much sense really, at least not to me.
From your description, I get the feeling that your data design is not
correct; you should not have to store a project name in more than one
table. So, I suggest you start by improving your design!. Need some help
with it? Post your current design (tables and fields in each).

Nikos
 
N

Nikos Yannacopoulos

Example:

[Table1]
Field1 Autonumber (PK)
Field2 Text
Field3 date/Time
....

[Table2]
FieldX Autonumber (PK)
FieldY Long (FK on Table1)
FieldZ Text
....

etc.

Nikos
 
G

Guest

I have several tables (5) that I am trying to "link" in a form. There are
several fields in each table, but the linking fields are Task Name and Form
Number. I don't think listing all the fields in the tables would be
helpful??
 
S

Steve Schapel

J. Davis,

If you want your form to show data from more than one table, the basic
concept here is to make a query which includes all the tables concerned,
and then this query is used as the Record Source of the form.

Your original question, about using a macro to enter data from one table
into another, is a very unusual thing to be doing. It is difficult to
offer specific advice without having a clear picture of what you are
reallt doing, and I think Nikos's suggestion about posting the data
structure is an attempt to understand your purpose.
 
G

Guest

I tried the query approach before the macro approach but it didn't work. I
wasn't able to enter info in the form view for "Yes/No" fields. The number
of fields is vast.
I was instructed by someone in our office that is very familiar with Access
to try the Macro approach due to the large number of fields. I have also
tried to link the tables using command buttons but that hasn't work either.
I have contacted a New Horizons Learning Center in Cincinnati to see if they
have someone that can help me on a fee basis - hopefully that approach will
work. Thanks for your help.
 
M

Michael Shannon

If you have already created the macro, why dont you have a button that runs
the macro?

Alternatively if the macro should be run when a certain event occurs, i.e.
when you update one field it runs the macro to update the other table, why
dont you use the on change property for the field you are entering??

Michael
 
S

Steve Schapel

J. Davis,

Sounds great. However, to be frank, the New Horizons Learning Center
will probably need you to reveal details of what you are trying to do
before they will be able to help you.

If the number of fields is vast, it almost certainly would indicate that
your table design is not valid.
 
G

Guest

Having difficulty reaching someone at New Horizons that can help me so I am
becoming very frustrated and running out of options. I don't have a problem
revealing the details to you - it is just so massive that the idea of trying
to key in all the info seems overwhelming. Any chance I can fax you copies
of my table designs? Just looking for help and hopefully some answers...
 
S

Steve Schapel

J. Davis,

You can email me the information, and I'll have a look. Just remove the
..ns from the end of my return email address. I will post any response
back here in the newsgroup.
 
S

Steve Schapel

Julie,

I received your emails, but can't see the information. Can you try
again, with your tables and forms as attachments to the email? You can
send to steves at mvps.org (replace the " at " with "@" obviously)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top