Results 1 to 9 of 9
  1. #1
    Join Date
    Nov 2008
    Posts
    8

    Unanswered: Help for an MS Access noob

    Hi guys,

    I'm trying to set up a db that will basicly store script names and email addresses.
    I have about 700+ scripts and each one emails out to a group or person.
    I have 3 tables set up. One has the scripts, another has email subject and the last has email addresses.

    I'm lost as to what way i should have the email table set up as there are over 240 different email addresses to use. I had set up an individual column for each address but I don't know how I would do a search to just return the script name, subject and email addresses asociated with the script I'm searching.

    Have I set the email table up incorrectly?

    Anyone know any good resources or sites where I could check how to create a search page?

    Thanks,
    Jaz

  2. #2
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    Have I set the email table up incorrectly?
    No.

    A table to hold all your e-mail addresses (one field, PK).
    A table to hold all your scripts (one field, PK).
    A table to match up scripts with email addresses (two fields, both PK, each FK to the PKs in the other tables).

    Mind you I have no idea what any extra requirements are, this seems way too simple to be what you actually will end up with. I'd guess that the addresses table might also have a groupname or such to deal with e-mail groups, but you haven't given much detail about what you want here.

    The idea of setting up a new column for each e-mail address is very very wrong. Just one field called EmailAddress (text:255) should be sufficient. Each record gives another e-mail address.
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!


    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

  3. #3
    Join Date
    Nov 2008
    Posts
    8
    But how do you link the emails to the script that they belong to. Sorry that its too simple but i know nothing about setting up databases.

    The end goal is to be able to either search for a certain script name so it returns the subject and the different email addresses in that script or search for an email address and it will return every script its in..

  4. #4
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    Yes, it is as I said in post 2.

    EG:

    SCRIPT
    ScriptID
    OtherScriptFields...

    EMAIL
    EmailID
    OtherEmailFields...

    SCRIPTMAIL
    ScriptID
    EmailID



    Underline = Primary Key

    If you know nothing about setting up database, perhaps you should do a bit more learning before you go making much? Could save you a lot of time and from making something that you just don't want to manage later!
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!


    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

  5. #5
    Join Date
    Nov 2008
    Posts
    8
    Thanks, that doesn't help me what so ever..

    I get what your talking about with the primary key. What I don't understand is how you assign multiple email addresses in the email table to one script in the script table?

  6. #6
    Join Date
    Feb 2004
    Posts
    214

    ...

    Relationships.
    When you link your email ID between the two tables it show the one email id from your email table and all of the scripts that match that id.
    You know, I'm sick of following my dreams, man. I'm just going to ask where they're going and hook up with 'em later

  7. #7
    Join Date
    Nov 2008
    Posts
    8
    Eventually got it... Didn't realise I had to set up a many-to-many relationship to get it to work..

    Have another question..

    I'm setting up a query to show my results but its creating a separate page for each email found in the one script. Is there a way to display the one script and all the emails belonging to it in a txt box or something?

  8. #8
    Join Date
    Feb 2004
    Posts
    214

    ...

    I take it you are using a form?
    Probably best to display the script on the form, and then have a subform showing all of the emails that relate to the script.
    You know, I'm sick of following my dreams, man. I'm just going to ask where they're going and hook up with 'em later

  9. #9
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    Mods would say, new question, new thread.
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!


    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •