#### how can 1 make a combination of 6 digits out of 40 numbers (1-40)

```how can 1 make a combination of 6 digits out of 40 numbers (1-40)
```
 2
Utf
11/25/2009 4:39:01 PM
access.gettingstarted 618 articles. 0 followers.

3 Replies
1438 Views

Similar Articles

[PageSpeed] 58

```Can you explain a little more what you are trying to do?

--
Build a little, test a little.

"sundy" wrote:

> how can 1 make a combination of 6 digits out of 40 numbers (1-40)
```
 0
Utf
11/25/2009 4:48:14 PM
```On Wed, 25 Nov 2009 08:39:01 -0800, sundy <sundy@discussions.microsoft.com>
wrote:

>how can 1 make a combination of 6 digits out of 40 numbers (1-40)

A 'digit' is a single numeric character - 39 is two digits. Do you want six
*digits* or a set of six numbers, as you would get with a Lotto game?

If the latter, you can get all 2763633600 possible combinations by using a
table Num with one number field N, manually filled with values 1 to 40. The
query would be a "Cartesian join" - just add the Num table to the query six
times, selecting N for each; Access will alias the instances to Num, Num_1,
Num_2 and so on. In the criteria for Num_1.N put

> Num.N

In the criteria for Num_2.N put

> Num_1.N

and so on up to Num_6.N; this will prevent duplicates.

DON'T print this query unless you own stock in the company that makes toner

If you want just a (single) random set of six numbers, there are tricks to do
so...
--

John W. Vinson [MVP]
```
 0
John
11/25/2009 6:40:01 PM
```If you are wanting a Lotto type list on 6 numbers then I found that it was
too large for Access 2007 to handle.  Calculating 40 to the 6th power is
4096000000.

If you want to try then this is SQL using table named CallData and field Num
containing number 1 through 40 and no number duplicated in a field of same
recrord --
SELECT CallData.Num AS POS1, CallData_1.Num AS POS2, CallData_2.Num AS POS3,
CallData_3.Num AS POS4, CallData_4.Num AS POS5, CallData_5.Num AS POS6
FROM CallData, CallData AS CallData_1, CallData AS CallData_2, CallData AS
CallData_3, CallData AS CallData_4, CallData AS CallData_5
WHERE (((CallData.Num)<>[CallData_1].[Num] And
(CallData.Num)<>[CallData_2].[Num] And (CallData.Num)<>[CallData_3].[Num] And
(CallData.Num)<>[CallData_4].[Num] And (CallData.Num)<>[CallData_5].[Num])
AND ((CallData_1.Num)<>[CallData].[Num] And
(CallData_1.Num)<>[CallData_2].[Num] And (CallData_1.Num)<>[CallData_3].[Num]
And (CallData_1.Num)<>[CallData_4].[Num] And
(CallData_1.Num)<>[CallData_5].[Num]) AND ((CallData_2.Num)<>[CallData].[Num]
And (CallData_2.Num)<>[CallData_1].[Num] And
(CallData_2.Num)<>[CallData_3].[Num] And (CallData_2.Num)<>[CallData_4].[Num]
And (CallData_2.Num)<>[CallData_5].[Num]) AND
((CallData_3.Num)<>[CallData].[Num] And (CallData_3.Num)<>[CallData_2].[Num]
And (CallData_3.Num)<>[CallData_1].[Num] And
(CallData_3.Num)<>[CallData_4].[Num] And
(CallData_3.Num)<>[CallData_5].[Num]) AND ((CallData_4.Num)<>[CallData].[Num]
And (CallData_4.Num)<>[CallData_2].[Num] And
(CallData_4.Num)<>[CallData_3].[Num] And (CallData_4.Num)<>[CallData_1].[Num]
And (CallData_4.Num)<>[CallData_5].[Num]) AND
((CallData_5.Num)<>[CallData].[Num] And (CallData_5.Num)<>[CallData_2].[Num]
And (CallData_5.Num)<>[CallData_3].[Num] And
(CallData_5.Num)<>[CallData_4].[Num] And
(CallData_5.Num)<>[CallData_1].[Num]));

--
Build a little, test a little.

"KARL DEWEY" wrote:

> Can you explain a little more what you are trying to do?
>
> --
> Build a little, test a little.
>
>
> "sundy" wrote:
>
> > how can 1 make a combination of 6 digits out of 40 numbers (1-40)
```
 0
Utf
11/25/2009 7:02:21 PM

Similar Artilces:

error message "Some chart types cannot be combined with other char
I am getting this error message "Some chart types cannot be combined with other chart types. Select a different chart type" with the same selection sometimes it goes smoothly, and sometimes i get this message, and i am only trying to do a very basic column shart with the names of the counties and the number of accidents for 5 years for each county what am i doing wrong? Hi, I have not heard of that warning happening sporadically. It only happens when you try to combine charts that will not mix. When you say it sometimes works is that when trying the same mixture on the same ...

How can I set up the random selection of a cell from within a ran.
I want Excel to randomly select one cell from a range of cells, but is it possible? This would be the equivalent of drawing one slip of paper from several hundred. An uncomplicated way to do this is to simply add a column filled with the RAND() function next to your column of choices. Select both columns, and sort on the Rand() column. Pick the one at the top, or bottom, as your random selection. A little more complicated procedure would be to use a formula, referring to this combination of Rand() and your list, and let this formula randomly pick an item. Place your list in an "out o...

Can you program Excel to draw an asymptote?
I want to know if there is a way to get excel to put an asymptote on a chart if you already have a parabolic data set on the chart. My goal is to find to value of the asymptote for further analysis. I know I can fudge a straight line graph onto the chart but it is not meaningful without the true value. HELP!!! "csusbgirl07" <csusbgirl07@discussions.microsoft.com> schrieb im Newsbeitrag news:6E51019A-7160-4A93-862F-A785BD2DBD3E@microsoft.com... > I want to know if there is a way to get excel to put an asymptote on a chart > if you already have a parabolic data set ...

Pivot Table Not Recognizing Numbers
I frequently download a huge amount of data to microsoft excel. For some reason recently, Excel has not been recognizing this data as numeric. I try changing the format and that doesn't help at all. The data looks fine but when I try to sort it, it sorts it as if it were text. When I try to create a Pivot Table, it changes every piece of data to 1 and gives me things like "Count of Cost" where everything = 1 instead of the actual cost. How can I fix this? There are no spaces before or after the data. If I click in an individual cell twice (without doing anything ...

A guy here at work can't get exe files through his outlook. Is there a check to uncheck somewhere to allow it to do this? He can receive normal attachments. ...

Need to sum up numerous columns in different worksheet into 1
Hi, I generate 100-200s .csv files end of each month for my company. Each of these .csv files have numerous data that I need to sum up for a report. (Example: 1.csv have 3 columns with things like, item A, item C, item D etc and 2.csv have columns with item B, item C and item E... and so on and so on) I am required to sum up all these 100-200s .csv files and have a total sum of how many of each items appeared and used by the users. (Example: item A - total count 100, item B - total count 20.. .etc etc) Is there a way I could do it without going through each of the .csv files and counti...

how can i do this
i am using office 2007 i have a table called titles that has title of the movie and the another field called year of movie also another table called actor that has actor name of the actos and another infos and third table called title-actor which is junction table of the two previous tables and has the fields of title,year,actor name year the title and the year is conectted to titles table and the actor name to the actor name in actor table now i have form based on each of the two tables and each one has sub form whichs based one the junction table like this the title form has su...

Can field names be changed with a query?
I've got a sequence of queries that culminates in a final make-table query. I would like to change the fieldnames with the final query, producing the table with new fieldnames. Is there a way to do this? Thanks, Patrick Sure. In the field name put what you want to see in the new table like so: NewName: OldFieldName What is before the colon ( : ) should be the new field name. -- Jerry Whittle, Microsoft Access MVP Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder. "Pat" wrote: > I've got a sequence of queries that culminates in a final make-tab...

How can I get Outlook (2002) from deleting emails older than 6 day
I have auto-archiving turned off, ansd I am doing backups manually thru the backup utility. Thanks! Mark H. -- Science-based nutrition! See TIOEnterprises.net Change your view settings - enable the advanced toolbar and use the dropdown to enable all messages, not just messages from the last seven days. -- Milly Staples [MVP - Outlook] Post all replies to the group to keep the discussion intact. All unsolicited mail sent to my personal account will be deleted without reading. "Mark Hilbrink" <MarkHilbrink@discussions.microsoft.com> wrote in message news:639E637B-C8B...

Outlook 2003
Hello all, I would really appreciate some help on this. I run Norton AntiVirus and it has this really aggravating behavior .. all virus infected attachments are deleted, but the emails they rode in on end up in my inbox. There is no NAV option to not only delete a virus infected attachment but also its email. Since all of the virus infected email I get is spam, I end up with lots of extra junk in my inbox. The Outlook 2003 junk filtering does a pretty good job on everything else. So .. I want to create a rule to move all emails with a file attachment called "Norton AntiVirus Deleted1...

Can't group pivot table items by month in Excel
i use excel 2004 for mac but have the same problem using 2003 for windows. i have a pivot table with dates in the rows, names in the columns and count of quantity in the data section. i want to group the date entries by month. i follow microsoft's help directions listed below but i am never prompted with a starting at box, ending at box or by box. the pivot table just groups whatever i have highlighted and gives me no other options. i would like to use this smart grouping option. please help. 1. Hold down CONTROL and click the selected date or time items, point to Group and Outline...

Money Plus Deluxe #6
Hi, I have downloaded the trial version and input all my data, now I am trying to purchase the full version however I live in Australia and there is no option for purchasing here. I don't need a localised version the current version I have is fine I just want to continue using all the data I have put into the program. Do you have a link for purchases outside of the US Many thanks Wayne One workaround that some people have used is to not request a CD and to quote a USA address. 1600 Pennsylvania Avenue, Washington, DC comes to mind. :-) Once you have the download make sure you bu...

Someone who can provide TRaining in NJ
Hiya, I just openned a retail store in NJ. I need some help with some features and am looking for some in store training formyself and my partner. We are looking for informal, mostly question and answer training and demonstration and maybe some assistance in setting up some features we are unsure about. We have been using the system for several months now. Marc We have installed over 100 stores across North America remotely. Are services are a \$100/hr and we can spread out training sessions over serveral days to allow you to digest the information. If interested you can contact me a...

Allen Browne - Find as you type
Hello Allen (or others) I am using Allen Browne's great utility 'Find as you type' on a form, but now want to print the results of the forms output. Can it be done? "efandango" <efandango@discussions.microsoft.com> wrote in message news:62B48567-5241-4707-83EE-EB01656BA1A3@microsoft.com... > I am using Allen Browne's great utility 'Find as you type' on a form, but > now want to print the results of the forms output. Can it be done? You may be able to apply the form's filter as the WhereCondition for OpenReport, like this: ...

VBA Make Access wait API is not working
Dear All The API: Shell and Wait, by Terry Kreft is not working to me http://www.mvps.org/access/api/api0004.htm I know I can not post the API by Terry Kreft, but I can post what changes I did in the original API ------ Function ShellWait(Pathname As String, Optional WindowStyle As Long) End Function ----- This is my code in a module 'Initialize New Event Make_Access_Wait 'Make Access wait till It is done with other application MsgBox "Rutina ShellWait" Call ShellWait("C:\Program Files\Dups\Batch Files\HashIt.bat") I really need to Access wait till...

I have a column of many many numbers how can i split them up auto
I have a group of numbered data that I can split into different columns using text to column. I now need to place a blank row in between each row of diffeerent data. Can this be done Give a few examples of what your data looks like and what you are trying to achieve. What do you mean by "different data". Pete On Dec 3, 8:23=A0pm, Kevin <Ke...@discussions.microsoft.com> wrote: > I have a group of numbered data that I can split into different columns u= sing > text to column. =A0I now need to place a blank row in between each row of > diffeerent data. ...

Can I do Labels from out look and also How do I
I really need to print some adress labels and put them on another computer how can I do this? I can either use mord or out look Check OfficeOnline's template section to see if something there suits your needs: http://office.microsoft.com/en-us/templates/default.aspx "Capggal" <Capggal@discussions.microsoft.com> wrote in message news:661FAA77-F696-4324-BB7F-C72F1AFBEF43@microsoft.com... >I really need to print some adress labels and put them on another computer > how can I do this? I can either use mord or out look > ...

Can (or how can) I do this
Hello, My Access application tracks an employee's progress through a process similar to hiring. There are 5 steps in the process. I track 4 of the steps by counting the number of times a value appears in a date field for that step. The count is then displayed and used in a calculation. The 5th step is more complicated. The 5th step needs to determine if the employee has verified that he can access all the applications that he should have access to. My process tracking table has the first 4 dates. The application access info comes from a different table. This process trackin...

Can I create a one page Twelve Month Calendar
I am trying to create a One Page Twelve Month (2006) Calendar, using either Publisher or Power Point, that gives me room for Logo and/or address to distribute among my customers. Publisher version? New, Publications for print, calendars, when the wizard opens and you select your design choice, there are options for date range and so on. -- Mary Sauer MSFT MVP http://office.microsoft.com/ http://msauer.mvps.org/ news://msnews.microsoft.com "Chezerim" <Chezerim@discussions.microsoft.com> wrote in message news:07D91E48-54E7-412F-BF0D-721A481BB375@microsoft.com... >I am t...

How can I scan images into seperate worksheets at once?
I am trying to use my scanner to insert documents into excel. When I do it, it adds all the images into one sheet that overlap each other. How can I get excel to add each image to its own worksheet? jwewing23 wrote: > I am trying to use my scanner to insert documents into excel. When I do it, > it adds all the images into one sheet that overlap each other. How can I get > excel to add each image to its own worksheet? What I do is scan into a file, then run that file through OCR software and then that data goes into Excel. But then I want data I can manipulate with Excel -- I&...

Can I save my presentation to open up in the first slide
I'm using PP 2003 and want to run off my presentation on CD's. When I save it, and play the CD, it opens up in my work window. All the tools at the top and the slides to the left of the screen. Is it possible to save it and have it open to my first slide on the screen, and show from there, without all the tools showing from the work screen. "Grace" <Grace@discussions.microsoft.com> wrote in message news:F9912FA1-2497-413C-A416-70EBA9888FAE@microsoft.com... > I'm using PP 2003 and want to run off my presentation on CD's. When I > sa...

Can a macro be written to launch a pre-canned e-mail?
I need to launch an e-mail quickly with as few key strokes as possible. The e-mail needs to have a pre-canned subject line, a simple pre-canned message body and, a follow up flag. I have a template but also need to set the Follow up flag each time I send it and this has proven more time consuming than is practical for this application. Can a macro be written to open the template and set the follow up flag to the current date and 1 minute forward from the current time? Most of the time the message will be sent with just that. On occasion I may need to add a word or two to the subject...

How do I get UML profile on Visio 2003, I can't seem to find it?
My laptop has visio 2003 installed on it, but I can't find the UML profile, so I can do activity diagrams, class diagrams etc. I followed the instructions in online help http://office.microsoft.com/en-au/visio/HP815502391033.aspx? pid=CH010267621033, but that option doesn't come up, must I install the component? Thanks Andy Maybe you only have Visio Standard, not Visio Professional? http://www.qbssoftware.com/DDGzone/product_brochure.asp?product=MSVISIO#fea "Andius" <Andius@discussions.microsoft.com> wrote in message news:7ABAB5D0-409A-431B-9A46-AAB733A97A42@mi...

Restricting number of viewings?
Without using macros, is there a way to allow someone to view an application only once or twice, after which point they could no longer view the spreadsheet (for example, if I want to send a worksheet sample that I don't want to be used permenantly). I don't think so, you can restrict access with macros but this can be overcome by opening the workbook with macros disabled. You can also write code to prevent a workbook being opened unless macros are enabled, but this is overcome quite easily by anyone with a little knowledge of Excel and VBA. In short, Excel is not designed for securit...

Error: Can't open this item
Accessing email stored on Exchange 5.5. May open mailbox and view headers from emails..upon opening these emails error message 'Can't open this item' appears....no further information. The error initially appeared on Outlook 2002, service packing 2002 to both sp1 and sp2 did not fix the error. Installing and upgrading to Outlook 2003 has not fixed either. Any help would be greatly appreciated. Regards, Tom ...