Link to home
Start Free TrialLog in
Avatar of oceansupport
oceansupport

asked on

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

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.
Avatar of JimFive
JimFive
Flag of United States of America image

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
Avatar of oceansupport
oceansupport

ASKER

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.
I would consider changing the SQL table structure to something like what is described above.
--
JimFive
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...:(
ASKER CERTIFIED SOLUTION
Avatar of JimFive
JimFive
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial