Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Creating form based on Cross Tab Query that allows user input to additional fields.

Posted on 2007-11-19
5
Medium Priority
?
426 Views
Last Modified: 2013-11-28
I want to query my SQL table that contains information on product orders  by Style Color Size and Qty ordered.  Query paramater input by the user would be Job# (123 in the below example)

The Query results would be:

Job 123 Style12345 Brown   Small    100
Job 123 Style12345 Brown   Med      150
Job 123 Style12345 Brown   Large    150
Job 123 Style12345 Brown   Small     100

                                     

Now I want to take output the results to a Form that looks like a cross tab, but with additional columns for the user to add more information for the order. ie., Price, Due Date, Treatment Type (These three fields don't exist in the SQL table...so, I'm guesing I need to export the query results to a new table).

                                                   Sm        Md         Lg            Xl     Price  DueDate TreatmentType
Job123 Style12345 Brown       100        150       150         100    _____ ______ _____________

BTW, the Size codes can vary ...sometimes X1 X2 X3 X4 or a combination of about 15 size codes.

As a beginner, of course, I'm pretty lost.  But, I'm thinking this would be a good project.

In the end, multiple job information would be stored by multiple users.  They'd then output the completed information to a PDF or hard copy.

Your advice is greatly appreciated.
0
Comment
Question by:oceansupport
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 15

Expert Comment

by:JimFive
ID: 20315818
It looks like you are doing a sort of order entry form.

Doing the input as you describe is difficult and probably won't end up working out as you desire.

You probably want to have (at least) 2 tables, one for the order header that would contain Job#, OrderDate, DueDate, CustomerId, and anything else that is job related. Another table for the order detail that would contain style, color, size, qty, price, treatmenttype.  I assume that it might be possible to order the same product with different treatments that might be different prices.  I also assume that prices might change over time (or in fact, between size categories).  If you use this design you will see that what makes sense is to create a mainform/subform design where the job information is in the main form and the product information is in the subform.

You can then process your results into a report as you like.

--
JimFive
0
 

Author Comment

by:oceansupport
ID: 20315908
So, appending the header and detail tables with the query results.  This info is showing up on my form...I'm confusing myself since I'm still thinking in terms of my table structure on the SQL side.
0
 
LVL 15

Expert Comment

by:JimFive
ID: 20319332
I would consider changing the SQL table structure to something like what is described above.
--
JimFive
0
 

Author Comment

by:oceansupport
ID: 20319969
SQL is the back end to our MAS200 ERP...can't change the table structure.  I'm considering a separate database so as not to chance interfering with MAS....it's very picky and violates standard programming conventions...:(
0
 
LVL 15

Accepted Solution

by:
JimFive earned 2000 total points
ID: 20320081
Well then, yes.  Create a table to hold the additional information that you need.  Link it into a subform from your results so that the data can be filled in.  Your main form can just be your search criteria (e.g. a Select Job # box) and then the subform can be the updatable detail lines.
--
JimFive
0

Featured Post

Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The Windows Phone Theme Colours is a tight, powerful, and well balanced palette. This tiny Access application makes it a snap to select and pick a value. And it doubles as an intro to implementing WithEvents, one of Access' hidden gems.
We live in a world of interfaces like the one in the title picture. VBA also allows to use interfaces which offers a lot of possibilities. This article describes how to use interfaces in VBA and how to work around their bugs.
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

660 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question