Results 1 to 7 of 7
  1. #1
    Michael_ is offline Novice
    Windows 7 Access 2007
    Join Date
    May 2010
    Posts
    3

    Angry Basic questions from a newbie! :(

    Afternoon/Morning/Evening!

    I'm trying to create a simple database. I've imported my data from Excel into a fresh table in a new DB. I didn't create the Excel data so have to work with it in this form.



    The DB basically looks like this.




    Dave has chosen option B and option D, Phil has only chosen 1 option. Options go onto span 60 options (prefixed by a date) and there's 120 names.


    Now I know this is really basic and I'm so sorry but I'm just loosing my mind on this!!

    I would like to print a report on who has chosen option A (there's about 120 names but all follow the example in layout) - Display this in a form first, but would be making a report to print off. If I could as a user select the name and then only have it display the options selected in the form?

    Secondly I'd like to inform Dave and each person what options they have chosen - probably in a mailmerge. Happy enough doing the mailmerge or report but I know I need to query/filter the data first!


    Hope this makes a little sense! Sorry for the basics. I'm kicking myself that I just can't do this. So far I can produce the report and the form but it displays all options - not just the chosen ones (1's in my case!)

    Hope someone can help and thank you for taking the time to read this

    Michael

  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,640
    Are you looking to correct the design, or work with this monstrosity as it is?

    It sounds like you want to keep it like it is, which will be problematic. For starters, the name of your field isn't "Option A", but "2". So the direct answer to your question is a query:

    SELECT [1]
    FROM Sheet1
    WHERE [2] = "1"
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    TheShabz is offline Court Jester
    Windows XP Access 2003
    Join Date
    Feb 2010
    Posts
    1,368
    Do what Pbaldy said, but beforehand, reimport that excel sheet and check the "first row contains field names" to get proper field names.

  4. #4
    Michael_ is offline Novice
    Windows 7 Access 2007
    Join Date
    May 2010
    Posts
    3
    Opps...Thanks guys.

    I have/had done that - just made that screenshot as an example and didn't import, just quickly typed something to try and show you what I meant!

    Schoolboy error there....

    So fields are correctly titled (unlike my screenshot!) as I described in the first post

    Monstrosity? If only I hadn't made it worse by adding a shoddy screenshot....

    My stupid posting mistake aside - Does your answer still stand pbaldy?

    Thanks guys - much appreciated and thank you for your patience....

  5. #5
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,640
    If there are still fields for dates and options, I stand by "monstrosity".

    And presuming there are, then my query would still work, you would just need to adjust the field names to actual. If possible, I'd seriously consider normalizing the data when you bring it into Access.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  6. #6
    Michael_ is offline Novice
    Windows 7 Access 2007
    Join Date
    May 2010
    Posts
    3
    Baldy - Thanks again for replying. I'm not sure what you mean I'm afraid.




    Hopefully this looks better - an actual screengrab of the db with names marked out.

    Thanks again

  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,640
    Try

    SELECT FirstName
    FROM Sheet1
    WHERE [10/05/2010 Option A] = 1

    If I've correctly deduced what that field name is, and if the table name is still Sheet1.

    That design will be really difficult to work with in the long run. It's normal spreadsheet design, but databases are designed to work differently. A normalized table might look like the attached, based on your first example (though in a normalized database you would only store the person's ID, not their name too). More info about the data would yield better design ideas.
    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. Using Access Instead of Visual Basic
    By dinz in forum Programming
    Replies: 2
    Last Post: 12-19-2019, 10:33 AM
  2. Replies: 11
    Last Post: 01-21-2010, 11:01 AM
  3. Really basic question
    By jimlaw in forum Forms
    Replies: 1
    Last Post: 07-27-2009, 07:20 AM
  4. newbie questions
    By bigmac in forum Access
    Replies: 0
    Last Post: 10-07-2008, 12:53 AM
  5. Basic Question
    By chris11590 in forum Forms
    Replies: 0
    Last Post: 08-04-2008, 05:57 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