WUGNET, the Windows User Group Network
Your Complete Resource Center for "The Best" in Shareware, Computing Tips and Support, Windows Industry News... and much more!
Home Forums Shareware Windows Tips Hot Offers FREE Newsletters Arcade Contact Us About Partners
Search WUGNET: RSS Feeds RSS Feeds Advertise with WUGNET    |    Shareware eBooks
HomeHome FAQFAQ   SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log in/Register/PasswordLog in/Register/Password

Can a field store a date and/or any other data type?

 
Goto page 1, 2
   Home -> Office other -> Table Design RSS
Next:  Table Design: Has anyone created?  
Author Message
JethroUK

External


Since: Aug 09, 2004
Posts: 11



(Msg. 1) Posted: Wed Jul 23, 2008 4:02 pm
Post subject: Can a field store a date and/or any other data type? Add to elertz
Archived from groups: microsoft>public>access>formscoding, others (more info?)

I'm using Excel to keep data on students

I'm currently describing the state of any particular field as either '*' =
student has started this part of their programme - or a date "15/7/08" to
describe their end/completion date for that same part of the programme

I want to import all this data into Access but can a field store a date
and/or any other data type as per Excel?
Back to top
Login to vote
Stefan Hoffmann

External


Since: Mar 01, 2006
Posts: 515



(Msg. 2) Posted: Wed Jul 23, 2008 5:07 pm
Post subject: Re: Can a field store a date and/or any other data type? Add to elertz [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

hi,

JethroUK wrote:
> I want to import all this data into Access but can a field store a date
> and/or any other data type as per Excel?
You need to store that in two fields:

Started: DateTime or Yes/No Field.
Completed: DateTime



mfG
--> stefan <--
Back to top
Login to vote
Allen Browne

External


Since: Nov 08, 2003
Posts: 9151



(Msg. 3) Posted: Wed Jul 23, 2008 11:08 pm
Post subject: Re: Can a field store a date and/or any other data type? Add to elertz [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

No. Unlike columns in a spreadsheet, fields in a database are properly
typed, so you cannot store a non-numeric value in a Number field, or a
non-date value in a date/time field.

--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"JethroUK" <reply.RemoveThis@the.board> wrote in message
news:edf6sTN7IHA.1204@TK2MSFTNGP04.phx.gbl...
> I'm using Excel to keep data on students
>
> I'm currently describing the state of any particular field as either '*' =
> student has started this part of their programme - or a date "15/7/08" to
> describe their end/completion date for that same part of the programme
>
> I want to import all this data into Access but can a field store a date
> and/or any other data type as per Excel?
Back to top
Login to vote
JethroUK©

External


Since: Sep 05, 2007
Posts: 3



(Msg. 4) Posted: Wed Jul 23, 2008 11:08 pm
Post subject: Re: Can a field store a date and/or any other data type? Add to elertz [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Then is it possible to assign a date type field as 'not null'? - which could
in turn be described on a form/report as 'started' (but not yet completed)

I am currently describing over 12 activities with 12 fields/columns and it
is likely (once i have database set up i will go on to describe/track 20-30
activities) so i don't really want several fields per activity to maintain,
if one date field will describe it


"Allen Browne" <AllenBrowne.RemoveThis@SeeSig.Invalid> wrote in message
news:#EeIqXN7IHA.4192@TK2MSFTNGP06.phx.gbl...
> No. Unlike columns in a spreadsheet, fields in a database are properly
> typed, so you cannot store a non-numeric value in a Number field, or a
> non-date value in a date/time field.
>
> --
> Allen Browne - Microsoft MVP. Perth, Western Australia
> Tips for Access users - http://allenbrowne.com/tips.html
> Reply to group, rather than allenbrowne at mvps dot org.
>
> "JethroUK" <reply.RemoveThis@the.board> wrote in message
> news:edf6sTN7IHA.1204@TK2MSFTNGP04.phx.gbl...
>> I'm using Excel to keep data on students
>>
>> I'm currently describing the state of any particular field as either '*'
>> = student has started this part of their programme - or a date "15/7/08"
>> to describe their end/completion date for that same part of the programme
>>
>> I want to import all this data into Access but can a field store a date
>> and/or any other data type as per Excel?
>
Back to top
Login to vote
Jerry Whittle

External


Since: Mar 03, 2006
Posts: 1903



(Msg. 5) Posted: Wed Jul 23, 2008 11:08 pm
Post subject: Re: Can a field store a date and/or any other data type? Add to elertz [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Step away from the keyboard! You are trying to "commit spreadsheet". Having
12 fields with similar data with the possibility of going to 30 fields is a
very bad idea. Your table has serious normalization problems and just will
NOT work correctly in a relational database. Period.

I highly recommend getting some relational database training or reading
"Database Design for Mere Mortals" by Hernandez before proceeding any further
on this database.
--
Jerry Whittle, Microsoft Access MVP
Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder.


"JethroUK©" wrote:

> Then is it possible to assign a date type field as 'not null'? - which could
> in turn be described on a form/report as 'started' (but not yet completed)
>
> I am currently describing over 12 activities with 12 fields/columns and it
> is likely (once i have database set up i will go on to describe/track 20-30
> activities) so i don't really want several fields per activity to maintain,
> if one date field will describe it
>
>
> "Allen Browne" <AllenBrowne.TakeThisOut@SeeSig.Invalid> wrote in message
> news:#EeIqXN7IHA.4192@TK2MSFTNGP06.phx.gbl...
> > No. Unlike columns in a spreadsheet, fields in a database are properly
> > typed, so you cannot store a non-numeric value in a Number field, or a
> > non-date value in a date/time field.
> >
> > --
> > Allen Browne - Microsoft MVP. Perth, Western Australia
> > Tips for Access users - http://allenbrowne.com/tips.html
> > Reply to group, rather than allenbrowne at mvps dot org.
> >
> > "JethroUK" <reply.TakeThisOut@the.board> wrote in message
> > news:edf6sTN7IHA.1204@TK2MSFTNGP04.phx.gbl...
> >> I'm using Excel to keep data on students
> >>
> >> I'm currently describing the state of any particular field as either '*'
> >> = student has started this part of their programme - or a date "15/7/08"
> >> to describe their end/completion date for that same part of the programme
> >>
> >> I want to import all this data into Access but can a field store a date
> >> and/or any other data type as per Excel?
> >
>
Back to top
Login to vote
JethroUK©

External


Since: Jul 23, 2008
Posts: 4



(Msg. 6) Posted: Wed Jul 23, 2008 11:08 pm
Post subject: Re: Can a field store a date and/or any other data type? Add to elertz [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

my problem is only small (as described), but even with your vast knowledge
you don't seem to see a simple solution

so I don't think reading a book would help me at all

i think i'll just have to use two fields to describe start & end every
single activity



"Jerry Whittle" <JerryWhittle DeleteThis @discussions.microsoft.com> wrote in message
news:BB0E51DE-A616-4B7F-91E2-EB21542F7DFB@microsoft.com...
> Step away from the keyboard! You are trying to "commit spreadsheet".
> Having
> 12 fields with similar data with the possibility of going to 30 fields is
> a
> very bad idea. Your table has serious normalization problems and just will
> NOT work correctly in a relational database. Period.
>
> I highly recommend getting some relational database training or reading
> "Database Design for Mere Mortals" by Hernandez before proceeding any
> further
> on this database.
> --
> Jerry Whittle, Microsoft Access MVP
> Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder.
>
>
> "JethroUK©" wrote:
>
>> Then is it possible to assign a date type field as 'not null'? - which
>> could
>> in turn be described on a form/report as 'started' (but not yet
>> completed)
>>
>> I am currently describing over 12 activities with 12 fields/columns and
>> it
>> is likely (once i have database set up i will go on to describe/track
>> 20-30
>> activities) so i don't really want several fields per activity to
>> maintain,
>> if one date field will describe it
>>
>>
>> "Allen Browne" <AllenBrowne DeleteThis @SeeSig.Invalid> wrote in message
>> news:#EeIqXN7IHA.4192@TK2MSFTNGP06.phx.gbl...
>> > No. Unlike columns in a spreadsheet, fields in a database are properly
>> > typed, so you cannot store a non-numeric value in a Number field, or a
>> > non-date value in a date/time field.
>> >
>> > --
>> > Allen Browne - Microsoft MVP. Perth, Western Australia
>> > Tips for Access users - http://allenbrowne.com/tips.html
>> > Reply to group, rather than allenbrowne at mvps dot org.
>> >
>> > "JethroUK" <reply DeleteThis @the.board> wrote in message
>> > news:edf6sTN7IHA.1204@TK2MSFTNGP04.phx.gbl...
>> >> I'm using Excel to keep data on students
>> >>
>> >> I'm currently describing the state of any particular field as either
>> >> '*'
>> >> = student has started this part of their programme - or a date
>> >> "15/7/08"
>> >> to describe their end/completion date for that same part of the
>> >> programme
>> >>
>> >> I want to import all this data into Access but can a field store a
>> >> date
>> >> and/or any other data type as per Excel?
>> >
>>
Back to top
Login to vote
Klatuu

External


Since: Apr 06, 2005
Posts: 2879



(Msg. 7) Posted: Wed Jul 23, 2008 11:08 pm
Post subject: Re: Can a field store a date and/or any other data type? Add to elertz [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Jethro, everyone here is trying to help you. The problem is you are trying
to shoehorn a spreadsheet solution into a relational database. If you
continue on your current path, it will only get harder. You probably would
be better off staying in Excel.

To be specific, You really don't need the 30 fields for one student. What
you need is a table that identifies the students, one to identify the
activities, and another to show the current status of an activity for a
student. So to keep it as simple as possible (you may need more info in your
tables)

tblStudent
StudentID - Autonumber PK
StudentFirstName - Text
StudentLastName - Text

tblActivity
ActivityID - Autonumber PK
ActivityDescription - Text

tblStudentActivity
StuActID - Autonumber PK
StudentID - Long Integer - Foreign Key to tblStudent
ActivityID - Long Integer - Foreign Key to tblActivity
ActivityStartDate - Date
ActivityCompleteDate - Date

Now, you use a record in the tblStudentActivity table for each Activity for
Each Student. This is a very basic relational design.

If you have any questions on this, please post back.


--
Dave Hargis, Microsoft Access MVP


"JethroUK©" wrote:

> my problem is only small (as described), but even with your vast knowledge
> you don't seem to see a simple solution
>
> so I don't think reading a book would help me at all
>
> i think i'll just have to use two fields to describe start & end every
> single activity
>
>
>
> "Jerry Whittle" <JerryWhittle.TakeThisOut@discussions.microsoft.com> wrote in message
> news:BB0E51DE-A616-4B7F-91E2-EB21542F7DFB@microsoft.com...
> > Step away from the keyboard! You are trying to "commit spreadsheet".
> > Having
> > 12 fields with similar data with the possibility of going to 30 fields is
> > a
> > very bad idea. Your table has serious normalization problems and just will
> > NOT work correctly in a relational database. Period.
> >
> > I highly recommend getting some relational database training or reading
> > "Database Design for Mere Mortals" by Hernandez before proceeding any
> > further
> > on this database.
> > --
> > Jerry Whittle, Microsoft Access MVP
> > Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder.
> >
> >
> > "JethroUK©" wrote:
> >
> >> Then is it possible to assign a date type field as 'not null'? - which
> >> could
> >> in turn be described on a form/report as 'started' (but not yet
> >> completed)
> >>
> >> I am currently describing over 12 activities with 12 fields/columns and
> >> it
> >> is likely (once i have database set up i will go on to describe/track
> >> 20-30
> >> activities) so i don't really want several fields per activity to
> >> maintain,
> >> if one date field will describe it
> >>
> >>
> >> "Allen Browne" <AllenBrowne.TakeThisOut@SeeSig.Invalid> wrote in message
> >> news:#EeIqXN7IHA.4192@TK2MSFTNGP06.phx.gbl...
> >> > No. Unlike columns in a spreadsheet, fields in a database are properly
> >> > typed, so you cannot store a non-numeric value in a Number field, or a
> >> > non-date value in a date/time field.
> >> >
> >> > --
> >> > Allen Browne - Microsoft MVP. Perth, Western Australia
> >> > Tips for Access users - http://allenbrowne.com/tips.html
> >> > Reply to group, rather than allenbrowne at mvps dot org.
> >> >
> >> > "JethroUK" <reply.TakeThisOut@the.board> wrote in message
> >> > news:edf6sTN7IHA.1204@TK2MSFTNGP04.phx.gbl...
> >> >> I'm using Excel to keep data on students
> >> >>
> >> >> I'm currently describing the state of any particular field as either
> >> >> '*'
> >> >> = student has started this part of their programme - or a date
> >> >> "15/7/08"
> >> >> to describe their end/completion date for that same part of the
> >> >> programme
> >> >>
> >> >> I want to import all this data into Access but can a field store a
> >> >> date
> >> >> and/or any other data type as per Excel?
> >> >
> >>
>
Back to top
Login to vote
Allen Browne

External


Since: Nov 08, 2003
Posts: 9151



(Msg. 8) Posted: Thu Jul 24, 2008 3:00 am
Post subject: Re: Can a field store a date and/or any other data type? Add to elertz [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

"Klatuu" <Klatuu DeleteThis @discussions.microsoft.com> wrote in message
news:92D049F3-04E7-4BD4-91BC-913029FFEA6E@microsoft.com...
> Jethro, everyone here is trying to help you. The problem is you are
> trying
> to shoehorn a spreadsheet solution into a relational database. If you
> continue on your current path, it will only get harder. You probably
> would
> be better off staying in Excel.

Jethro, please hear that. Don't frustrate yourself with your current path.

--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.
Back to top
Login to vote
Display posts from previous:   
       Home -> Office other -> Table Design All times are: Eastern Time (US & Canada) (change)
Goto page 1, 2
Page 1 of 2

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Categories:
 Windows XP
 Windows Vista
 Windows Other
 Office
  Office Other
 Security
 WinRAR
  • Home |
  • Shareware |
  • Windows Tips |
  • Hot Offers |
  • FREE Newsletters |
  • Arcade |
  • Forums |
  • eBooks |
  • About WUGNET |
  • Partners |
  • Contact

  • WUGNET Privacy Policy |
  • Link to WUGNET