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  dBforums > PC based Database Applications > Microsoft Access > Change table a query is Using

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 09-12-06, 16:17
joshm joshm is offline
Registered User
 
Join Date: Mar 2005
Posts: 4
Change table a query is Using

Is there an easy way to change the table that a query is using? I am going to have several tables (Bill of Materials) for different Jobs, and wanted to keep the jobs in ine database, will each job being its own table. Then I could run my queries and generate an organized bill of materials, and will be able to look back later and see what parts are common in each job (table).

Basically what I am looking to do is have the user prompted to select which table to use to run the queries.

Thanks for any help!
Reply With Quote
  #2 (permalink)  
Old 09-12-06, 16:21
pootle flump pootle flump is offline
King of Understatement
 
Join Date: Feb 2004
Location: One Flump in One Place
Posts: 14,905
Hi Joshm

Welcome to the forum

It is possible but not trivial. Before you settle on this design take a deep breath, read the link, count to 3 and be certain you want to go down this route. Under most circumstances - this would be considered bad design.

http://r937.com/relational.html
__________________
Testimonial:
Quote:
pootle flump
ur codings are working excelent.
Reply With Quote
  #3 (permalink)  
Old 09-12-06, 16:22
pootle flump pootle flump is offline
King of Understatement
 
Join Date: Feb 2004
Location: One Flump in One Place
Posts: 14,905
... and that has got to be the record date-of-joining-to-first-post difference ever
__________________
Testimonial:
Quote:
pootle flump
ur codings are working excelent.
Reply With Quote
  #4 (permalink)  
Old 09-12-06, 16:31
M Owen M Owen is offline
Grand Poobah
 
Join Date: Sep 2003
Location: MI
Posts: 3,713
Snarky: This has (pardon my French) cluster-f**k written all over it ... Bad design? Hell yes. Nobody designs a DB to have each job be in its own table ... You can analyze material commonalities within a single table ... It's called reports.

Hey Poots, doesn't Access still have a limit on the # of physical tables allowed? I know it was 255 as of A2K ...

So this design MAY blow up in you face is short order ...
__________________
Back to Access ... ADO is not the way to go for speed ...
Reply With Quote
  #5 (permalink)  
Old 09-12-06, 16:32
pkstormy pkstormy is offline
Moderator
 
Join Date: Dec 2004
Location: Madison, WI
Posts: 3,925
Yes to Pootle Flump! Usually you want to keep fields that collect the same information in 1 table and "group" them by another field similar to a "category" type field. It makes it easier in the long run on design and reporting.
__________________
Expert Database Programming
MSAccess since 1.0, SQL Server since 6.5, Visual Basic (5.0, 6.0)
Reply With Quote
  #6 (permalink)  
Old 09-12-06, 16:35
joshm joshm is offline
Registered User
 
Join Date: Mar 2005
Posts: 4
Yeah, it been awhile. I originally joined to fix another problem with another table and ended up corresponding away from the forum.

Any suggestions on another way to approach this situation?
Reply With Quote
  #7 (permalink)  
Old 09-12-06, 16:41
pootle flump pootle flump is offline
King of Understatement
 
Join Date: Feb 2004
Location: One Flump in One Place
Posts: 14,905
Quote:
Originally Posted by M Owen
Snarky: This has (pardon my French) cluster-f**k written all over it ... Bad design? Hell yes. Nobody designs a DB to have each job be in its own table ... You can analyze material commonalities within a single table ... It's called reports.
Ah - the world is back in order

Quote:
Originally Posted by M Owen
Hey Poots, doesn't Access still have a limit on the # of physical tables allowed? I know it was 255 as of A2K ...
Dunno - never got close to 255 in Access quite frankly.

joshm - what was the design of the original Jobs tables?
__________________
Testimonial:
Quote:
pootle flump
ur codings are working excelent.
Reply With Quote
  #8 (permalink)  
Old 09-12-06, 16:45
joshm joshm is offline
Registered User
 
Join Date: Mar 2005
Posts: 4
I am uning Inventor to create 3d Drawings... I was hoping to export my bill of materials to Access, keep some kind of order between jobs (drawings), and be able to generate an organized bill of materials and be able to search the different jobs for common parts (for example all jobs that use a certain model pump)
Reply With Quote
  #9 (permalink)  
Old 09-12-06, 17:45
pootle flump pootle flump is offline
King of Understatement
 
Join Date: Feb 2004
Location: One Flump in One Place
Posts: 14,905
That last statement is another good reason why a nice, relational design is best.

By design of jobs table I meant like
Table:
Jobs
Fields:
Job_ID Integer
Job_Name Text(30)

etc etc
__________________
Testimonial:
Quote:
pootle flump
ur codings are working excelent.
Reply With Quote
  #10 (permalink)  
Old 09-13-06, 08:12
joshm joshm is offline
Registered User
 
Join Date: Mar 2005
Posts: 4
Table: (Job Name) for which ever job

Fields:
Item
Part Number
Description
Qty
Cost
FloodedWeight
Weight
Labor
PL (pipe length)
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On