A Microsoft Office (Excel, Word) forum. OfficeFrustration

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   Home » OfficeFrustration forum » Microsoft Access » New Users
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Starting Database



 
 
Thread Tools Display Modes
  #1  
Old October 8th, 2009, 07:38 PM posted to microsoft.public.access.gettingstarted
Bill
external usenet poster
 
Posts: 1,009
Default Starting Database

Can someone help me out in creating my database? I am very new to working in
Access and am trying to learn as I go. The following is what I am hoping to
make.

I want to create a Pick3 Lottery Database. The fields that I need a
Date (date of drawing),
Weekday (day of the week)
Drawing (midday or evening or bonus)
1st Number (first number drawn)
2nd Number (second number drawn)
3rd Number (third number drawn)

Now my question is how I can set up my table or tables. Would it be better
to have a separate table for each field or just one table? Also is there any
special formatting I need to do, so my Tables are set up correctly.
Some Queries I will have when Tables are finished:
1st Number drawn on any Thursday for Midday drawing
All three numbers drawn on certain date
How many times a number was drawn in specified time frame

There are many other relationships and queries I have, but this should give
you an idea of what I am attempting to do. I looked for something similar in
structure of what I am trying to do, but could not find anything. If anyone
knows of tables or forms I can look at would also help me.
Thanks,
Bill

  #2  
Old October 8th, 2009, 08:46 PM posted to microsoft.public.access.gettingstarted
Klatuu
external usenet poster
 
Posts: 7,074
Default Starting Database

The fields you have listed should all be in one table. Since there may be
more than one drawing on a date, you can't use that as the primary key. You
would need either an Autonumber field as the primary key or you could use a
composite primary key that would be the date and the drawing. I would also
suggest you consider adding Lottery field to tell you who the drawing is for.
For example, in Texas, we have Mega Millions and the Texas Lottery, so you
may want to be able to track multiple lotteries. If so, you would need an
additional field in your main table. It should be a Long Integer and it
should be used as a surrogate key for a new Lottery table that would have an
autonumber primary key to relate it to the Lotttery table using the surrogate
field. Also, I would expand the drawn numbers field to 6, with one bing the
kicker number. That is, for example in Power Ball, there is a number that is
different from the others and could be a duplicate of one of the other 5.

There is one field you do not need. That is the Weekday. It is easy to
calculate and since all you need to calculate and display the week day is a
simple expression.

= WeekDayName(Weekday([DrawingDate]))

Also, change the name of the field named Date. Date is an Access reserved
word because it is the name of a function and I have seen Access get confused
over whether you are using the name of a field or the function.


--
Dave Hargis, Microsoft Access MVP


"Bill" wrote:

Can someone help me out in creating my database? I am very new to working in
Access and am trying to learn as I go. The following is what I am hoping to
make.

I want to create a Pick3 Lottery Database. The fields that I need a
Date (date of drawing),
Weekday (day of the week)
Drawing (midday or evening or bonus)
1st Number (first number drawn)
2nd Number (second number drawn)
3rd Number (third number drawn)

Now my question is how I can set up my table or tables. Would it be better
to have a separate table for each field or just one table? Also is there any
special formatting I need to do, so my Tables are set up correctly.
Some Queries I will have when Tables are finished:
1st Number drawn on any Thursday for Midday drawing
All three numbers drawn on certain date
How many times a number was drawn in specified time frame

There are many other relationships and queries I have, but this should give
you an idea of what I am attempting to do. I looked for something similar in
structure of what I am trying to do, but could not find anything. If anyone
knows of tables or forms I can look at would also help me.
Thanks,
Bill

 




Thread Tools
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

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 11:14 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.