execute a query from form using form fields

  • Thread starter Thread starter davidjurban
  • Start date Start date
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?
 
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?
 
Back
Top