Re: Entering data in one form while updates 2 or more tables
- From: John W. Vinson <jvinson@xxxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Mon, 25 Jun 2007 22:41:27 -0600
On Sun, 24 Jun 2007 23:48:03 -0700, qvqv <qvqv@xxxxxxxxxxxxxxxxxxxxxxxxx>
wrote:
Hi, there
I constructed a form! [Purchase] based on a query. The form is based on one
query, which was built from two queries and one table. In this form, by
entering data and saving record, I am able to update the form's underlying
tables and queries upon which the form was built.
However, there're a few fields entered that I'd like to also undate another
table, e.g. [Stock], which is not the underlying table of this form. I am
wondering how I am able to do that.
I suppose maybe some code building or macro is needed to make this
possible? I am totally stuck here, any help or guidance is highly
appreciated.
Many thanks.
qvqv
Well, you can certainly use VBA code in the form's AfterUpdate event to open a
Recordset based on the other table and update it. You have not posted anywhere
near enough information for anyone to write sample code, of course!
HOWEVER... the assertion in your other message that you would otherwise be
entering the same data twice raises some big red flags. The whole POINT of a
relational database architecture is that you should store data once, and once
only; the additional point that the other table is unrelated to this one
strongly suggests a problem with the design!
What are these tables?
What real-life entities (things, persons, events) do they represent?
What needs to be updated in [Stock], and why?
John W. Vinson [MVP]
.
- Prev by Date: Re: Not getting the data output I want
- Next by Date: Re: Auto resize/fit to screen
- Previous by thread: Re: Entering data in one form while updates 2 or more tables
- Next by thread: Sync 2 combo boxes where one of the combo box has a value list
- Index(es):
Relevant Pages
|