Results 1 to 7 of 7
  1. #1
    P3ndrag0n is offline Novice
    Windows 7 32bit Access 2013
    Join Date
    Mar 2015
    Posts
    7

    Missing Something Easy (I hope)

    Table Structure:

    tblUpgradeDate

    AVDate text
    BoardDate text
    SeatingDate text
    TableDate text

    In each of the above the user can input one of the following:

    Summer 2015
    Spring 2015
    Winter 2015


    Spring 2016
    Summer 2016
    Winter 2016
    (so on and so forth through 2020.)

    I want to produce a report showing me all entries by whatever time frame I enter.

    If I enter Summer 2016 at a prompt I want it to return ALL entries regardless of column with Summer 2016.

    I know I can filter individual columns (and query individual columns) but I need to quickly answer the question: "Tell me every upgrade we have coming up for Spring 2016"

    Is there a way to query an entire table for a text string (Summer 2016) to return all results with Summer 2016 in it? Or am I way off base? I really feel like I'm over-thinking this.

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,652
    Well, your table isn't normalized, which makes it harder. That said, you can create a query and put the criteria under the date fields, each on a separate criteria line. That will create an "OR" criteria and should do what you want.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    P3ndrag0n is offline Novice
    Windows 7 32bit Access 2013
    Join Date
    Mar 2015
    Posts
    7
    Hmm let me give a little more info I neglected to input before so maybe its a little clearer. Actual table structure is as follows:

    tblUpgradeDate

    ID (PK) (autonumber)
    Building (text)
    Room (text)
    AVDate text
    BoardDate text
    SeatingDate text
    TableDate text

    Every single building and room will only ever have 1 Avdate or 1 BoardDate or 1 SeatingDate etc etc. Unless I'm way off there's no way to further normalize this particular table?

  4. #4
    ssanfu is offline Master of Nothing
    Windows XP Access 2000
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    PMFJI Paul,

    P3ndrag0n,
    Well, yes the table can be normalized further. "AVDate", "BoardDate", etc are actually data as field names.
    And what happens in a year when you (or someone) might want to add another date, say "GroupDate" (or whatever). Using your table structure, you would have to modify the table, queries, forms, reports and possibly code.

    Consider:
    Code:
    tblBuildings
    -----------------
    BuildingsID (PK) (autonumber)
    Building (text)
    Room (text)
    
    tblUpgrades
    -----------------
    UpgradesID (PK) (autonumber)
    BuildingID_FK Long  (foreign key to buildings
    UpgradeDate (text)    (values can be: Summer 2015, Spring 2015, Winter 2015 or  Winter 2016)
    UpgradeType (text)  (values can be: AV, Board, Seating, Table)


    Because there are so many values for "UpgradeDate", I would also have a (look up) table for Upgrade Dates.. Then the structure would be:
    Code:
    tblBuildings
    -----------------
    BuildingsID (PK) (autonumber)
    Building (text)
    Room (text)
    
    tblUpgrades
    -----------------
    UpgradesID (PK) (autonumber)
    BuildingID_FK Long  (foreign key to buildings)
    UpgradeDateID_FK (Long)    (foreign key to tblUpgradeDates)
    UpgradeType (text)  (values can be: AV, Board, Seating, Table)
    
    
    tblUpgradeDates
    -----------------
    UpgradeDateID_PK (autonumber)
    DateWhen (text)  (values can be: Summer 2015, Spring 2015, Winter 2015, Winter 2016......, Winter 2020)
    This way, if there is no date for "Seating date" or "Table date" there is not a record. All "dates" are in one field.... searching is Soooo much easier.


    My $0.02..............

  5. #5
    P3ndrag0n is offline Novice
    Windows 7 32bit Access 2013
    Join Date
    Mar 2015
    Posts
    7
    Steve,

    I gotta say it makes a lot of sense. It never dawned on me that the blank fields would register as records therefore keeping me from querying the information I was looking for. I'm going to try breaking this out into separate tables (I did this for a completly differnt set of "Upgrade Dates") and see if this gets me where I want to be. Going to marked as answered.

    Thanks!

  6. #6
    abeha is offline Novice
    Windows XP Access 2002
    Join Date
    Apr 2015
    Posts
    1
    Is there a way to query an entire table for a text string (Summer 2016) to return all results with Summer 2016 in it? Or am I way off base? I really feel like I'm over-thinking this.

    __________________
    emma

  7. #7
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,652
    Same answer as post 2.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

Similar Threads

  1. I hope to look at the database
    By azhar2006 in forum Database Design
    Replies: 12
    Last Post: 12-13-2013, 11:52 AM
  2. Hope NOT to get in trouble here
    By djclntn in forum Forms
    Replies: 12
    Last Post: 03-06-2012, 02:36 PM
  3. Replies: 0
    Last Post: 03-29-2011, 09:37 AM
  4. Simple Question...I hope
    By AndrewCoy in forum Access
    Replies: 1
    Last Post: 07-18-2010, 10:06 AM
  5. Probably missing something easy
    By z1efuller1 in forum Database Design
    Replies: 5
    Last Post: 11-12-2009, 11:18 AM

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