Results 1 to 10 of 10
  1. #1
    uaguy3005 is offline Advanced Beginner
    Windows 7 64bit Access 2013
    Join Date
    Mar 2010
    Posts
    45

    Recordsource Issues?

    I'm working on database to monitor change management at our production facility. I'm rather frustrated at the current setup and would love some feedback on how I should've done this. The objective being to record an issue, capture what was done to validate the part after the change and who approved it. I'm currently getting an error "You cannot add or change a record because a related record is required in tblApprovers". If anyone can help me make this current version work or maybe provide a idea for a better solution, I would be eternally grateful.



    Database attached.
    Attached Files Attached Files

  2. #2
    Missinglinq's Avatar
    Missinglinq is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    May 2012
    Location
    Richmond (Virginia, not North Yorkshire!)
    Posts
    3,018
    You might want to give us a clue as to what, exactly, you're trying to do, and on which Form...you've got seven of them, after all!

    Generically speaking, this error pops up when you try to add a Child Record when no Parent Record already exists...typically you're trying to add a Record in a Subform when there is no Record in the Main Form, as yet.

    Linq ;0)>

  3. #3
    uaguy3005 is offline Advanced Beginner
    Windows 7 64bit Access 2013
    Join Date
    Mar 2010
    Posts
    45
    Quote Originally Posted by Missinglinq View Post
    You might want to give us a clue as to what, exactly, you're trying to do, and on which Form...you've got seven of them, after all!

    Generically speaking, this error pops up when you try to add a Child Record when no Parent Record already exists...typically you're trying to add a Record in a Subform when there is no Record in the Main Form, as yet.

    Linq ;0)>
    Sorry - I'm using the form frm4MChange as the main form. After entering information in the top of the form, I try to enter the information about the issue in the subform below and I get the error that a record is required in one of the subtables. Hope that helps. Any information you can give would be appreciated.

  4. #4
    orange's Avatar
    orange is offline Moderator
    Windows 8 Access 2010 32bit
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,870
    If you were in a McDonalds food line and the person behind you --who doesn't know you, who doesn't know database, who has never heard of msAccess -- asked what you are working on, what would you say?
    We know nothing of you, your environment, your business, so pretend that any of us is that person at McDonalds.

  5. #5
    uaguy3005 is offline Advanced Beginner
    Windows 7 64bit Access 2013
    Join Date
    Mar 2010
    Posts
    45
    Quote Originally Posted by orange View Post
    If you were in a McDonalds food line and the person behind you --who doesn't know you, who doesn't know database, who has never heard of msAccess -- asked what you are working on, what would you say?
    We know nothing of you, your environment, your business, so pretend that any of us is that person at McDonalds.
    Ok- I'm working on a database to track changes in our manufacturing process. The plan is that anytime a change is made to who is working on the station, or maintenance makes a process adjustment, or there is a change with the material or the assembly method; we would record the issue (what changed), document what we did to validate the part (part validation) and who approved the change (approvals). For each issue entered, there will be multiple validation steps completed and more than one approval. I'd like to be able to have the person making the change enter the issue in the database and then from a separate front end the person responsible for validation will complete the validation and update the database and finally the person(s) responsible for approval to be able to go in and approve the change.

    Let me know if this helps. I feel like this maybe a bit too ambitious a project right now. Lol.

  6. #6
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows 7 32bit Access 2013
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,614
    IMHO if your relationships are correct then your main form should be the the form you are currently trying to use as a sub form and your sub form should be the form that you are currently trying to use as a main form.
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

  7. #7
    uaguy3005 is offline Advanced Beginner
    Windows 7 64bit Access 2013
    Join Date
    Mar 2010
    Posts
    45
    Quote Originally Posted by Bob Fitz View Post
    IMHO if your relationships are correct then your main form should be the the form you are currently trying to use as a sub form and your sub form should be the form that you are currently trying to use as a main form.
    So i tried that approach...I think. Revised database attached. I'm still having a recordsource error on tblApprovers after I enter information in frm4MChange. Not sure what's causing it, I think I've got the relationships setup correctly.
    Attached Files Attached Files

  8. #8
    orange's Avatar
    orange is offline Moderator
    Windows 8 Access 2010 32bit
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,870
    Give us a step by step procedure to use your application.
    I tried using FrmChange and got stopped at the Time. I bypassed that and got an error in PartValidation and Approvers.

    We do not know how your application works. We are trying to help, but you'll have to give instructions.
    Remember we don't know details of what the system is supposed to do, nor exactly what you have tested with what data. Details please.

    Why can't you use Now, instead of Date and Time?

    I have reread your description and have pieced together some facts that may or may not apply.

    There are several manufacturing processes
    A changeType can be a ( process adjustment, material change, change to assembly method)
    A change is identified as an Issue ( with before and after measure?? ---doesn't meet some criteria??)
    An issue is recorded by the person who identifies the issue
    Each change has many related validation steps
    Each validation step has 1 or more approvals
    A Person is responsible for 0,1 or more Validation step(s)
    A Person is responsible for Approving changes
    Where do Parts, PartValidations, Classifications, RiskLevel and Repair techs fit in your "requirements"/"specifications"?

  9. #9
    uaguy3005 is offline Advanced Beginner
    Windows 7 64bit Access 2013
    Join Date
    Mar 2010
    Posts
    45
    Quote Originally Posted by orange View Post
    Give us a step by step procedure to use your application.
    I tried using FrmChange and got stopped at the Time. I bypassed that and got an error in PartValidation and Approvers.

    We do not know how your application works. We are trying to help, but you'll have to give instructions.
    Remember we don't know details of what the system is supposed to do, nor exactly what you have tested with what data. Details please.

    Why can't you use Now, instead of Date and Time?

    I have reread your description and have pieced together some facts that may or may not apply.



    Where do Parts, PartValidations, Classifications, RiskLevel and Repair techs fit in your "requirements"/"specifications"?

    First - Thanks for taking the time to help me. I really appreciate it. Step by step the application would work like this:
    1) Technician would enter the date and time of the change that happens (I didn't use now, because someone may want to enter the change after it actually occurs)
    2) Technician would enter the cell or press and the part number the change occurred on. (I use tblParts and tblMfgProcess to store that data)
    3) Technician would enter the change type (this is where tblClassifications comes in. Depending on the risk and change type that will determine who is required to approve the change)
    4) Enter the issue and solution
    5) Enter the repair tech who made the change and how long it took to make the change (this is where tblRepairTech fits in)
    6) The team leader would select what was done to validate the part after the change, hence I made it a subform where multiple options can be selected (the options are stored in tblPartValidation)
    7) The approvers would then go in and select their names to authorize the change, I also made this a subform on the Approvals tab so that multiple approvers can go in and verify the change. (the options are stored in tblApprovers)

    I'm not sure why you had an error on the time, perhaps due to the input mask I have on it. For the sake of trouble shooting, you can delete it from the form completely if it helps.

    The issue I have is after i complete steps 1-5 and i go down into the part validation section to select what I did to validate the change, I get an error that says "You cannot add or change a record because a related record is required in table 'tblApprovers'. Not sure why I'm getting this. Same error occurs when I try to select an approver after completing steps 1-5.

    You can also ignore frmMfgProcess, frmParts and frmRepairTech as I plan to have those be "Maintenance forms" for someone to be able to add and remove parts, process and people from the selection options in the dropdown menus.

  10. #10
    orange's Avatar
    orange is offline Moderator
    Windows 8 Access 2010 32bit
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,870
    I am assuming we're working with frm4MChange. I have made comments in Orange as I tried to enter a record based on your post/steps.
    1) Technician would enter the date and time of the change that happens (I didn't use now, because someone may want to enter the change after it actually occurs)
    2) Technician would enter the cell or press and the part number the change occurred on. (I use tblParts and tblMfgProcess to store that data) What control exactly is this?What specifically does user do?
    3) Technician would enter the change type (this is where tblClassifications comes in. Depending on the risk and change type that will determine who is required to approve the change)???There is only 1 repair tech
    4) Enter the issue and solution OK -just any text
    5) Enter the repair tech who made the change and how long it took to make the change (this is where tblRepairTech fits in)Are they entering before and after the repair is made?? Unclear
    6) The team leader would select what was done to validate the part after the change, hence I made it a subform where multiple options can be selected (the options are stored in tblPartValidation) ??This seems to be an after the fact statement--would seem this is a decision to be made in advance of the repair??? I have no idea what I'm suppose to do with PartValidation????
    7) The approvers would then go in and select their names to authorize the change, I also made this a subform on the Approvals tab so that multiple approvers can go in and verify the change. (the options are stored in tblApprovers)??How do/did the names get in and how are they associated with this specific issue??


    My gut feeling( may be incorrect) is that you have not tested your steps with your database and form. It seems there are things to be entered as an issue is raised/identified, and then some things that could only be input/updated after the repair was made. For example --time to do the repair --could estimate 2 hours, but once started it could take 1hr or 4 hours. So, how and when to use certain controls seems lacking or confusing. Somewhere, you need to define/display/inform user of whatever you expect with PartValidation, and, if there are a number of steps involved, I think these should be in your database/model. Perhaps there should be a little more detailed analysis to ferret out the nitty- gritty requirement details.

    Note: These are my comments and gut feeling based on a very limited knowledge of what you are trying to do. I could be way off base. You know your environment and the requirement better than any reader.

    Good luck with your project.

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

Similar Threads

  1. Tab Control and Recordsource
    By gmaster in forum Forms
    Replies: 2
    Last Post: 05-30-2014, 07:18 PM
  2. RecordSource issue?
    By glen in forum Forms
    Replies: 25
    Last Post: 07-31-2012, 09:34 AM
  3. RecordSource sql stays
    By rashima in forum Forms
    Replies: 0
    Last Post: 04-20-2012, 05:56 AM
  4. RecordSource Error
    By scampbell in forum Programming
    Replies: 7
    Last Post: 11-10-2011, 11:28 AM
  5. RecordSource help
    By mann2x in forum Access
    Replies: 3
    Last Post: 10-05-2010, 06:44 PM

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