Results 1 to 8 of 8
  1. #1
    WayneSteenkamp is offline Competent Performer
    Windows Vista Access 2010 32bit
    Join Date
    Feb 2012
    Posts
    107

    Database design/help

    Hi,



    I'm starting this over again so I can have all the answers I need in one thread and not multiple ones.

    The database I'm doing at the moment is near completion, for what is needed of it anyway. The user has requested a few extra tweaks which I have been able to do, though there is a couple which I desperately need help on.

    First of all to give you a slight insight of how the database needs to run:
    There's 4 tables, ASE_Units, (ASE)Repair History, Sim_Serials and SimSerial_Repairtracker
    The ASE_Units and the Repair_history are on a form together - Repair_history as a subform.
    The Sim_Serials and SimSerial_Repairtracker are on a form together - SimSerial_Repairtracker as a subform

    The User wants to record the ASE_Units and if theres a fault etc to it, the Repair_Tracker is filled out. The Same applies for the Sim_Serials and repairtracker. Except the Sims get cancelled on the repairtracker.


    The Question is: The user wants to know if she fills out the SimSerialNumber in the ASE_Unit form - The data will populate not only the ASE_UNit table but the SIm_Serials table aswell? She doesnt fancy enter the Sim data twice - one in the Sim_Serial form and the other in the ASE_Unit form. She only asks this because some Units will come with a Simnumber. All other Simnumbers that are on their own with be entered in the Sim_sErial form.These Sims will have a status :"Unassigned"


    Brings to the 2nd question.
    At the moment any sims entered in the SIm_serial form will appear in the table as "unassigned: as default. How can i change the status automatically from "unassigned to "assigned" when a Unit is applied to it via the Ase_Unit form. The Status is currently in a lookup/combobox.

    Hope this makes sense.
    I've attached a print screen of my relationships, which I think may be incorrect. Especilly the Middle part when the SIm_serials and ASE_unit is linked. It doesn't seem to be doing anything. This because The SimNumber in the Sim_serial table is already in use?


    Any help would be greatly appreciated.

  2. #2
    orange's Avatar
    orange is online now Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,726
    What is the purpose of this intended database? You haven 't mentioned anything that helps us put your request/comments into context.

  3. #3
    irish634 is offline Advanced Beginner
    Windows XP Access 2010 32bit
    Join Date
    Feb 2012
    Posts
    48
    If I understand correctly, you will want to change your relationship between the "simserials' table and the "aseunits" table to a one-to-many and check the "enforce referential integrity" and "cascade update" boxes.

    Without seeing the database, I would probably make the field "SimSerialNumber" on the ASE_Units form a combo box. Then I would use the "Not In List" event to add the number to the Sim_Serials table when your customer typed in the number.

    As far as changing your "status" use the after update event on your "Unit" field on the ASE form.

  4. #4
    WayneSteenkamp is offline Competent Performer
    Windows Vista Access 2010 32bit
    Join Date
    Feb 2012
    Posts
    107
    Sorry, The database is to record and log where the SimSerialNumbers and ASE Units are. i.e whether they are assigned together, which site are they installed, if they are faulty - what's wrong, what unit/sim is replacing which if damaged etc.

    I am unable to change the relationship to a one to many or check the enforce referential integrity etc. It won't allow me. Tried this before. Not sure if its because the SimSerialNumber is being used already in the Sim_Serial table.

    I will have to sit down and see if the combo box and "not in List" event would work or not. Need to see if i can get my head around it to see if that method would work. There will be over 2000 sims and Units being entered into the database. Will this make a difference or not?

    The "status" im trying to change is only on the Sim Serial table. Not sure if its possible to use the after update event on both forms?

  5. #5
    orange's Avatar
    orange is online now Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,726

  6. #6
    irish634 is offline Advanced Beginner
    Windows XP Access 2010 32bit
    Join Date
    Feb 2012
    Posts
    48
    The Serial in the SIM_Serial table should be a primary key (no duplicates) and the serial in the ASE table should be a foreign key (duplicates allowed?).

    Check this out for using the 'not in list' : http://www.databasedev.co.uk/not_in_list.html

    Yes you can set the after update on both forms.

  7. #7
    WayneSteenkamp is offline Competent Performer
    Windows Vista Access 2010 32bit
    Join Date
    Feb 2012
    Posts
    107
    Yes I have the Primary key and foreign key set like that. See attachment. Don't want duplicates no.
    So with the use of the combo box I'd be able to have the SimSerial info entered in a form and the ASE unit and Sim tables will both be populated?

  8. #8
    WayneSteenkamp is offline Competent Performer
    Windows Vista Access 2010 32bit
    Join Date
    Feb 2012
    Posts
    107
    To change the Status by a macro..how do i go about doing it? what sort of coding do i need?

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

Similar Threads

  1. Database Design for Specification Database
    By khwaja in forum Database Design
    Replies: 2
    Last Post: 11-24-2011, 03:58 AM
  2. How would you design this database?
    By LBERG in forum Database Design
    Replies: 2
    Last Post: 10-24-2011, 02:51 PM
  3. Database design
    By BeetleBailey in forum Database Design
    Replies: 6
    Last Post: 09-20-2011, 01:35 PM
  4. Database Design
    By accessprogram in forum Database Design
    Replies: 1
    Last Post: 12-05-2010, 12:02 AM
  5. Database design help
    By DaveyJ in forum Database Design
    Replies: 7
    Last Post: 06-09-2010, 04: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