Creating A Table With All Possible Combinations

Apr 6, 2007

Hi,

I have the following dilemma. I have to make multiple tables with many columns and if I were to type in the data manually it would take me a few weeks. But if I could somehow specify the number of columns(and the number of choices in each column) and then have Access(or Excel) create a table with all the possible combinations it would make my job a LOT easier. For example, let's say I have department stores in multiple cities. I need to create the following table:

CITY DEPT CLOTHING

San Jose Men's Shirts
San Jose Men's Pants
San Jose Men's Shoes
San Jose Women's Shirts
San Jose Women's Pants
San Jose Women's Shoes
Los AngelesMen's Shirts
Los AngelesMen's Pants
Los AngelesMen's Shoes
Los AngelesWomen's Shirts
Los AngelesWomen's Pants
Los AngelesWomen's Shoes

Instead of typing that out manually, is it possible to create some sort of list like:

Cities: San Jose, Los Angeles
Dept: Men's, Women's
Clothing: Shirts, Pants, Shoes

And have Access or Excel create the table with all of the possible combinations?

Thanks for your time.

View Replies


ADVERTISEMENT

8 Table Need To Design Queries For All Possible Combinations...

May 21, 2007

Hi,

HELP!

I have 8 tables all with a membership number as the unique identifier, I need to find all the possible combinations and then create queries for each combination, is there a quick and easy way to do this? or do I have to sit and define a query for each of the 250ish combinations?!

I'm pulling all the data together using a union query. What I need to do now is to find the combinations using either "is null" or "is not null" criteria (in the queries).

Regards
H.

View 14 Replies View Related

Tables :: Cross Join TABLE - All Combinations

Sep 5, 2014

I am trying to create a cross join or Cartesian product TABLE, not a query.

I am creating a training database. For each and employee and each training event, I want to know - is this event required, who approved it, and when was it completed. The table I envision looks like this:

Code:
EMPLOYEE_ID EVENT_ID REQUIRED APPROVER EVENT_DATE
1 1 Y WPD 9/5/14
1 2 N

I currently have 39 employees and 473 events - 39*473 = 18447 records

I was able to make a cross join query and use make table, but whenever I add a new employee or event, if I update the make table query I will lose all my existing data.

View 3 Replies View Related

Multiple Combinations

Jun 8, 2005

Hi Everyone,

I want to perform queries that count the number of customers using combinations of different products.
The data is organised like so:

CustomerID ProductType No of Items
1 A 5
1 B 1
1 C 2
2 D 2
3 B 2
3 B 3

and so on.

There are 5 or 6 product types. I need to be able to produce a table showing all the various combinations. For example, number of customers using JUST product type A and nothing else, number of customers using product type A and product type B, customers using product type A, B and C
and so on.

I think there are around 64 different combinations!
I was wondering if there is a quicker way to do this apart from writing 64 different queries!!

Hope this clear and hope someone can help!

thanks!

Sasha.

View 3 Replies View Related

How To Search For Duplicate Combinations

Apr 16, 2012

I need to be able to find duplicate combinations (or, I suppose, permutations). I have four columns in a table that all contain inter values. I want to be able to query so that I can see if there are more than one records that have, say, 12, 28, 5, 14 in columns 1, 2, 3, and 4, respectively.

View 5 Replies View Related

A Query For Multiple Cjheck Box Combinations

Feb 1, 2008

All,

I have a problem building a query using multiple check boxes. The situation is as follows:

I have a database to monitor enquiries which come into a central email account. I have devised a system where several check boxes are used to define the nature of the enquiry. Users can tick any number or none of the options to describe the enquiry.

I would like to create a query where users can search the database based on the check boxes which have been ticked. For example, if users want to search for enquiries where a specific three check boxes have been ticked, I would like all of the records where these three boxes are checked to appear, and so on for all different combinations of check boxes ticked.

I've tried a few methods, including creating a seperate form for the query where users check their search criteria in line with the enquiry form, but I can't link this with the original form.

I hope my description adequetly conveys the problem I have!

Any thoughts would be most welcome.

Rob
:confused:

View 1 Replies View Related

A Query For Multiple Check Box Combinations

Feb 1, 2008

All,

I have a problem building a query using multiple check boxes. The situation is as follows:

I have a database to monitor enquiries which come into a central email account. I have devised a system where several check boxes are used to define the nature of the enquiry. Users can tick any number or none of the options to describe the enquiry.

I would like to create a query where users can search the database based on the check boxes which have been ticked. For example, if users want to search for enquiries where a specific three check boxes have been ticked, I would like all of the records where these three boxes are checked to appear, and so on for all different combinations of check boxes ticked.

I've tried a few methods, including creating a seperate form for the query where users check their search criteria in line with the enquiry form, but I can't link this with the original form.

I hope my description adequetly conveys the problem I have!

Any thoughts would be most welcome.

Rob
:confused:

View 2 Replies View Related

Choosing All Possible Combinations And Adding Their Values

Aug 25, 2004

ok this is weird post but im wonderin how to go about it easily cause i can think of a few ways, dunno if they will work of not, so im asking for ur opinion. I need to find out possible cominations for a salary cap football league based on dollar amounts for the players and points based on last years results, yet it cant go past $100.00...so one possible choice is (QB Tom Brady $22.56 183.50 points). its 1 QB, 2 RB, 3 WR, 1 TE 1 Kicker, 1 DEF team and i have to do all 9 for it to count...so would i have to set up 6 columns, one for each position and have a way of picking 1 of A 2 of B 3 of C 1 of D 1 of E 1 of F for 1 qb, 2 Rb, etc? and have it so sum of values is < $100 and it also must add the points so i can see the best possible combination/most points i can get for $100.00...i know its last years points and this year will be diff but I am just comparing...all i need is an outline i dont need u guys to do it for me i have some experience with access...thanks for anyone who can help

View 2 Replies View Related

Modules & VBA :: Combinations Of Records In A Field That Sum Up To Given Value

Oct 6, 2014

I am looking for a piece of code (either in access or excel) which will return all combinations of records in a particular field (or column of cells) which will sum up to a given value (or a close approximation thereof - ie a margin of error of, say, 2).

In other words, imagine you have a number field with 100 records in it. I would like to know all combinations of those records which add up to a value that the code could specify (eg 223). This would be incredibly valuable to assist in performing reconciliations that I perform in my role.

View 1 Replies View Related

Queries :: How To Reduce Down Data Set To Get A List Of All Unique Combinations Of Column

Jul 8, 2014

I am new to Access and am trying to reduce a dataset I am working with to make it managable for Excel. I have three columns which have three unique parameters and one column with numberical content.

Column A Column B Column C Column D
NJ Red Monday 10
NJ Red Tuesday 20
NJ Yellow Wednesday 30
NY Red Monday 35
NY Green Tuesday 40
NY Green Wednesday 60

I want to elimiate column C from the dataset, and sum column D for every unique combination of Column A & Column B. I have figured out how to reduce down the dataset to get a list of all unique combinations of Column A&B,what formula I can use in a query to sum column D on my table for every unique combination of column A&B. This is a simple SUMIF in excel, but my dataset is too large for excel.

View 4 Replies View Related

Creating A Table To Cross Index Items In Another Table

Sep 14, 2005

How do I create a table that can cross index items in another table. Maybe I am not using the right terms here so let me show a small example.

Say I have a tables of words.
tblWords
numWordID
txtWord

Then I have some entries, all more or less synonyms of each others
fresh
new
clean

Now I want to create a cross-index table, related to the table "tblWords" where I can select synonyms from words already in the table "tblWords", so if I for the word "fresh" add "new" and "clean" as synonyms or entries, if I then go and look at the word "new" it will already have the synonyms "fresh" and "clean", likewise the entry "clean" will then have the synonyms "fresh" and "new".

Kind of a many to many relationship junction table but only with one table!

I hope my explanation have not been to confusing, but let me know if you need a clarification.

Thanks

View 6 Replies View Related

Creating A Table In Sql

Jul 25, 2006

Hi,
I ve got an access db thats attached to a java application.
I need to be able to create a temporary table that stores a result set, its necessary to do this as the java app needs to perform lots of repeated operations on this temp table.

I was think something like this would work:

DROP TABLE tempResults
CREATE TABLE tempResults
AS
SELECT col1, col2, col3 ....
FROM orginalTable


So i tried this:

Create table temptable AS
SELECT education,
FROM supermarketTable;


but it doesnt work, access complains about syntax error in create statment.

Could anyone give me some pointers?

thanks in advance!

View 2 Replies View Related

Help Creating A Table.

Apr 2, 2007

what i am trying to do is have something create a new table. It could either be when a check box is clicked. but preferably when a name is entered into a text box. i just need the sub command to write. i tried using what access help has: SyntaxCREATE [TEMPORARY] TABLE table (field1 type [(size)] [NOT NULL] [WITH COMPRESSION | WITH COMP] [index1] [, field2 type [(size)] [NOT NULL] [index2] [, ...]] [, CONSTRAINT multifieldindex [, ...]])The CREATE TABLE statement has these parts:Part Description table The name of the table to be created. field1, field2 The name of field or fields to be created in the new table. You must create at least one field. type The data type of field in the new table. size The field size in characters (Text and Binary fields only). index1, index2 A CONSTRAINT clause defining a single-field index. multifieldindex A CONSTRAINT clause defining a multiple-field index but i keep getting an error. if someone could just give me a sample code that i could copy and paste into the code builder to get a simple table with one or 2 coloums i could edit to the specific things i need. i just dont know where to start. thanks for the help.

View 1 Replies View Related

Creating New Records In A Table

Sep 28, 2006

I think this is a pretty simple thing, but for some reason I'm lost.

I need to add a number of records to a table.

The user would input a starting record number and ending record number (ie 60000, 60003) and access would create those records with the record number field populated with all the values, in other words, it would create 4 records 60000,60001,60002, and 60003

any ideas how this can be done? I'm thinking a query, but it might require coding of a for...next loop???

Thanks in advance for the help

View 4 Replies View Related

Creating An If Statement In A Table

Jun 6, 2007

I have created a database that tracks employee adherence. We have employees monitor adherence and when someone is out of adherence we track the time they are out and also there shift time. I am needing Access to know to change a record from 0:00 (midnight) to 23:59. I know it is probably done with an IF statement but dont know how to write it correctly, or where to place it.

View 1 Replies View Related

Help Creating New Table From Query :(

Aug 10, 2007

Hey, I'm a VBA Newbie. I have a query that pulls information from my form as criteria and i want to create a table with the results...I am having trouble searching online for a solution and Access Help is no help. Is there a way I can do this using vba?

View 1 Replies View Related

Creating One Table From Many Tables

Aug 24, 2007

Hi All.
Need union three TableA, TableB and TableC into one table called TableX? All table has same column name. TableX shouldn't has dublications.
Thanks

View 1 Replies View Related

Creating Table Using Query?

Nov 24, 2004

Dear Friends,
I am creating a table using query, i want to mention the following criteria
1) Required
2) Allow Zero Length
3) Indexed

I could able to give only NoT NULL criteria. How to give other criterias in query.

regards
shruthi

View 1 Replies View Related

Creating A History Table

Sep 26, 2006

Hi, I'm new to the forum.

I would like to know how to create a history table that will copy information from a field called "Status" on my form just in case I inadverently erase old information from that field without me being aware of it with my keyboard keys etc. In others words when I'm am interrupted by someone and I didn't notice I had erase the information by mistake and closed out the form and realized when I go back into it, my old information have been erased and I don't have that information documented anywhere else to re-enter that old information into the Status section on my form.

Thanks.

View 1 Replies View Related

Creating Table Fields

Feb 12, 2008

Is it possible (and logical) for me to create a table with a calculated field from 2 other fields in the same table? Example; I have a long time field (mm/dd/yyyy hh:mm:ss) aka StartTime, and a long time field EndTime. I would like to subtract the StartTime field from the EndTime field to get the total time elapsed, but in hh:mm:ss format. I can get it in hh:mm format, but I really need the hh:mm:ss format. Any Ideas?

View 4 Replies View Related

Creating Views To A MS-Access Table

May 9, 2006

Hi all,

I write a program which is querying some data from a MS-Access database.
The problem here is, that the tablenames contain characters like "/" or "-" and I
do not want to change these names, because I think that the database
structure will be damaged.
To solve this problem I thought of creating a view to the table. I tried creating
this with a SQL statement, but that did not work.
Is there any other possibilty to create a view on a MS-Access table?

Regards,
Stefan

View 2 Replies View Related

Creating A Register System/table

Sep 7, 2006

Ok, firstly im sorry if this is in the wrong forum. I say this because my problem first begins with the tables but then i need to sort a problem out with the form aswell, but i will put it in here.

Here is the problem. Im sorry if im not too clear with this.

I need to create a register system E.G. A child comes into a club, he is registered. At the end of the session the child leaves the club. His depature is registered and his departure time is also recorded down.

Like a paper based school register but electronically.

How would I go about implementing this into a system?

Would I need a child table (with fields such as Child ID, Forename, Surname etc.) and a register table (not sure on the fields)?


k, this bit below probably goes in the forms section...

How would I get this to work on a form so there were boxes to check for arrival and departure, and when a button is clicked the depature time is filled in for each day of the term?

View 5 Replies View Related

Need Help Creating Table From Excel File

Nov 20, 2006

I am stuck with a problem where I need to create a new table from an excel file. In detail my problem is;
The excel file contains an order from a customer, like below,
BOM Component Qty
123 abc 2
123 def 2
234 ert 1
234 qwe 1
234 uio 1

I need to create a table from this data like;
Qty Partno
1 123
4 abc
4 def
1 234
2 ert
2 qwe
2 uio

NB! In reality the components are numbers not letters.
The qty for BOM is always 1 and the component 2xqty.

It is important that the BOM number is listed first and thereafter its components.

So I need to somehow associate the BOM number with its components and list them together as a group.
I just cannot figure out how to do this.

ANy help is greatly appreciated.

View 1 Replies View Related

Dynamically Creating MS Access Table

Feb 5, 2008

Hi,

I am trying to create a series of MS access tables from within a SQL 2000 DTS package. The names of the tables reflect the date range of the data within them. Creating the "Create table ddmmyy ...." statement isn't a problem (full code below), but doesn't run as it creates a Jet error - "Invalid SQL statement; expected 'DELETE', 'INSERT', 'PROCEDURE', 'SELECT', or 'UPDATE'. Does anyone know if what I'm trying to do is possible.

Before anyone suggests it, yes I have posted this on SQL server forums.

declare @TheName char (8)
,@Cmd char (500)

select @TheName = (select max(LastRunDate) from NSP_Analysis_Dates)

select @Cmd = 'CREATE TABLE `NSP_Analysis_' + @TheName + '` (`TYPE` VarChar (200) NULL, `VENDOR_NO` VarChar (10) NULL, `VENDOR_NAME` VarChar (50) NULL, `AMOUNT_CLAIMED` Currency NULL, `REGION` VarChar (100) NULL, `CLUSTER` VarChar (100) NULL, `PLANT_CODE` VarChar (15) NULL, `PLANT_NAME` VarChar (50) NULL, `DATE_OF_SERVICE` DateTime NULL, `STATUS` VarChar (200) NULL, `TICKET_NO` VarChar (20) NULL, `NOTES` VarChar (255) NULL, `DATE_ENTERED` DateTime NULL, `AuthorisedByName` VarChar (50) NULL)'
sp_executesql @Cmd

View 1 Replies View Related

Creating An Index Using Code? Any Other Way Besides On The Table?

Feb 17, 2005

I am pullling data from a query using an unbound form and a query that that uses linked tables. I can not edit the index of the tables, so is there a way i can create a new index for sorting data in a form?

View 2 Replies View Related

Creating A Table To Export To Excel

Aug 11, 2006

how easy is it to have access create a table and export it to excel, and then have fields on an already made spreadsheet filled in.

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved