execute a query from form using form fields

D

davidjurban

Hello all,
I would like to update two tables based upon change to a single tabl
Form. I want to create an insert query and then creat a macro to ope
the query and link it's execution to the AfterUpdate property of
field. Can I reference a form field directly in the sql statement? A
I on the right track here?
 
J

John Vinson

Hello all,
I would like to update two tables based upon change to a single table
Form. I want to create an insert query and then creat a macro to open
the query and link it's execution to the AfterUpdate property of a
field. Can I reference a form field directly in the sql statement? Am
I on the right track here?

For how to do it, yes - you can use a query parameter of the form

[Forms]![NameOfForm]![NameOfControl]

As to WHETHER you should do this at all, think carefully. Usually
storing the same data redundantly in two tables is A Very Bad Idea
since they two tables can easily get out of synch. Could you explain
why you feel this is needed?
 

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