Results 1 to 5 of 5
  1. #1
    Maoriboy is offline Novice
    Windows 10 Access 2016
    Join Date
    Oct 2017
    Posts
    3

    Help with creating a table for my DB

    First off sorry if theres already a post here about this i just didn't know how to word it and everything so i couldn't search SORRY.




    I have this:

    Click image for larger version. 

Name:	2017-10-11.jpg 
Views:	13 
Size:	97.9 KB 
ID:	30741


    and wanting to put it into my DB. and don't know how to do it. i have tried just doing this:

    Click image for larger version. 

Name:	2017-10-11 (1).jpg 
Views:	13 
Size:	222.6 KB 
ID:	30742


    which worked alright till i wanted to do queries for exact time and days. could anyone help me with this issue please? Much appreciated in advance.

  2. #2
    John_G is offline VIP
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2011
    Location
    Ottawa, ON (area)
    Posts
    2,615
    How is the data getting into the Time/Day preferred field? It doesn't appear to be automated, as there are a number of spelling mistakes.

    It looks as if that field is just a character string; that will make it "difficult" - to say the least - to search (as you are finding out). My suggestion is to make a separate "Preferred_Times" table, something like this:

    PSN_Tag (FK to Overwatch NZ Players)
    DayOfWeek (could be text or numeric, but numeric makes range selection easier. used "DayOfWeek" because "Day" is a reserved word)
    Start_Time
    End_Time

    Entries here could match the selections made on your form shown above, which allows for different time ranges on different days. (Surely you don't expect one time on say, Monday, and then a second time on, say, Thursday?). That would make no sense, IMO.

  3. #3
    Maoriboy is offline Novice
    Windows 10 Access 2016
    Join Date
    Oct 2017
    Posts
    3
    Thank you will try it out.

  4. #4
    Maoriboy is offline Novice
    Windows 10 Access 2016
    Join Date
    Oct 2017
    Posts
    3
    Quote Originally Posted by John_G View Post
    How is the data getting into the Time/Day preferred field? It doesn't appear to be automated, as there are a number of spelling mistakes.

    It looks as if that field is just a character string; that will make it "difficult" - to say the least - to search (as you are finding out). My suggestion is to make a separate "Preferred_Times" table, something like this:

    PSN_Tag (FK to Overwatch NZ Players)
    DayOfWeek (could be text or numeric, but numeric makes range selection easier. used "DayOfWeek" because "Day" is a reserved word)
    Start_Time
    End_Time

    Entries here could match the selections made on your form shown above, which allows for different time ranges on different days. (Surely you don't expect one time on say, Monday, and then a second time on, say, Thursday?). That would make no sense, IMO.
    What do you mean by "FK to Overwatch NZ Players"

  5. #5
    John_G is offline VIP
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2011
    Location
    Ottawa, ON (area)
    Posts
    2,615
    "FK" is short for "Foreign Key". It refers to a field in one table containing values which correspond to the PK (Primary Key) in another table. Put another way, they "point to" a record in another table. Very often there is a defined relationship between the two tables, but there doesn't have to be. FK - PK links are often used in multi-table queries to "look up" data to be included in the query results.

    Now that I look at your table Overwatch NZ Players again, PSN_Tag is not a good field to use to relate the two tables, because it is blank in a lot of records. What is the Primary Key of Overwatch NZ Players? Does it even have one? If it doesn't, how can you uniquely identify a record? You have to be able to uniquely identify records in order to relationships and queries to work properly.

    I should have mentioned that if you make a separate table for Preferred_Times, then you would remove the field Time/Day Prefered field from the players table.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 9
    Last Post: 06-15-2017, 03:00 PM
  2. Replies: 11
    Last Post: 02-20-2016, 12:39 AM
  3. Replies: 13
    Last Post: 12-08-2015, 01:36 PM
  4. Replies: 8
    Last Post: 01-27-2014, 12:41 PM
  5. Creating an If Then in a table
    By Mommo in forum Access
    Replies: 2
    Last Post: 08-07-2011, 10:51 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums