A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Pulling from three tables



 
 
Thread Tools Display Modes
  #1  
Old May 17th, 2010, 06:54 PM posted to microsoft.public.access
Emma
external usenet poster
 
Posts: 493
Default Pulling from three tables

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?
  #2  
Old May 17th, 2010, 07:13 PM posted to microsoft.public.access
Douglas J. Steele[_3_]
external usenet poster
 
Posts: 3,143
Default Pulling from three tables

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/ac...33.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" wrote in message
...
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?



  #3  
Old May 17th, 2010, 07:16 PM posted to microsoft.public.access
Arvin Meyer [MVP][_2_]
external usenet poster
 
Posts: 2,310
Default Pulling from three tables

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" wrote in message
...
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?



  #4  
Old May 18th, 2010, 04:41 PM posted to microsoft.public.access
Emma
external usenet poster
 
Posts: 493
Default Pulling from three tables

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" wrote in message
...
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?



.

  #5  
Old May 18th, 2010, 07:59 PM posted to microsoft.public.access
John W. Vinson
external usenet poster
 
Posts: 18,261
Default Pulling from three tables

On Tue, 18 May 2010 08:41:02 -0700, Emma
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]
  #6  
Old May 19th, 2010, 02:30 AM posted to microsoft.public.access
Arvin Meyer [MVP][_2_]
external usenet poster
 
Posts: 2,310
Default Pulling from three tables

That doesn't sound right to me. Please post the structure of your tables and
the SQL of the query that you are attempting .
--
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.accessmvp.com
http://www.mvps.org/access


"Emma" wrote in message
...
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" wrote in message
...
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?



.



 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 04:31 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.