From: Emma on
Hi I have a query which runs when the form is openned
unfortunately I can't save using:
DoCmd.RunCommand acCmdSaveRecord
it doesn't know which table to save the record to I'm assuming can someone
give me some direction?
From: Douglas J. Steele on
When you say "pulling from three tables", do you mean that the RecordSource
of the form is based on a query that joins three tables? As it says in
http://office.microsoft.com/en-us/access/HA100978761033.aspx#cannot you
cannot edit the data in a query when the query is based on three or more
tables and there is a many-to-one-to-many relationship.

--
Doug Steele, Microsoft Access MVP
http://www.AccessMVP.com/DJSteele
(no e-mails, please!)

"Emma" <Emma(a)discussions.microsoft.com> wrote in message
news:BF1E05D5-3613-4DDF-8406-FED0EF8ADF63(a)microsoft.com...
> Hi I have a query which runs when the form is openned
> unfortunately I can't save using:
> DoCmd.RunCommand acCmdSaveRecord
> it doesn't know which table to save the record to I'm assuming can someone
> give me some direction?


From: Arvin Meyer [MVP] on
If the query is updateable, (it may not be) it should save to the table
who's primary key is in the query. The other tables will have the same value
in the foreign keys.
--
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.accessmvp.com
http://www.mvps.org/access


"Emma" <Emma(a)discussions.microsoft.com> wrote in message
news:BF1E05D5-3613-4DDF-8406-FED0EF8ADF63(a)microsoft.com...
> Hi I have a query which runs when the form is openned
> unfortunately I can't save using:
> DoCmd.RunCommand acCmdSaveRecord
> it doesn't know which table to save the record to I'm assuming can someone
> give me some direction?


From: Emma on
I guess I can't use a query to pull from the three tables. I'll have to put
two of the tables together into one table. The problem being that I can now
only have one autonumber in the new table so how can I fake the second tables
autonumber?

"Arvin Meyer [MVP]" wrote:

> If the query is updateable, (it may not be) it should save to the table
> who's primary key is in the query. The other tables will have the same value
> in the foreign keys.
> --
> Arvin Meyer, MCP, MVP
> http://www.datastrat.com
> http://www.accessmvp.com
> http://www.mvps.org/access
>
>
> "Emma" <Emma(a)discussions.microsoft.com> wrote in message
> news:BF1E05D5-3613-4DDF-8406-FED0EF8ADF63(a)microsoft.com...
> > Hi I have a query which runs when the form is openned
> > unfortunately I can't save using:
> > DoCmd.RunCommand acCmdSaveRecord
> > it doesn't know which table to save the record to I'm assuming can someone
> > give me some direction?
>
>
> .
>
From: John W. Vinson on
On Tue, 18 May 2010 08:41:02 -0700, Emma <Emma(a)discussions.microsoft.com>
wrote:

>I guess I can't use a query to pull from the three tables. I'll have to put
>two of the tables together into one table. The problem being that I can now
>only have one autonumber in the new table so how can I fake the second tables
>autonumber?

What is the nature of the data? What are the relevant fields? Why do you need
two autonumbers?

A bit of context might help folks make some alternative suggestions. I'm a bit
uncomfortable with having two "autonumbers" in one table (one of them would
seem to be redundant), and equally so with jamming two valid entities into one
table.
--

John W. Vinson [MVP]