Results 1 to 8 of 8
  1. #1
    abernut is offline Advanced Beginner
    Windows 7 32bit Access 2007
    Join Date
    Jan 2013
    Location
    Jacksonville, FL
    Posts
    39

    Display info from another table on current form

    I have created the following database
    Click image for larger version. 

Name:	RelationshipsFinal.jpg 
Views:	7 
Size:	115.3 KB 
ID:	11161

    I have the following form that allows users to enter data into the MoldReq Table
    Click image for larger version. 

Name:	MoldRecForm.jpg 
Views:	7 
Size:	51.5 KB 
ID:	11162

    I need to create a form for the Mold Log. The user will select a Work Order, which is stored in the MoldReq table. Once this is selected I need the Mold and Part Name Fields to be auto filled based on the Mold selected. These values are also in the MoldReq table.
    It will look something like this:
    Click image for larger version. 

Name:	MoldLogForm.jpg 
Views:	5 
Size:	101.5 KB 
ID:	11164

    Thanks,
    Mike



    EDIT>>>
    I just relized that the ParName is not stored in the MoldReq table. That information is stored in the Mold Table.
    On the Mold Req form, when they click the drop down button to select the mold, I have three columns that display the Mold Number, Part Name, and Part Number.

    Do I need to add a Part Name field to the MoldReq table

  2. #2
    abernut is offline Advanced Beginner
    Windows 7 32bit Access 2007
    Join Date
    Jan 2013
    Location
    Jacksonville, FL
    Posts
    39
    I forgot to mention.
    The Mold and Part Name are just there to assist the user. They are not being written back to the MoldLog table

  3. #3
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,641
    Does this work for you?

    http://www.baldyweb.com/Autofill.htm



    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  4. #4
    abernut is offline Advanced Beginner
    Windows 7 32bit Access 2007
    Join Date
    Jan 2013
    Location
    Jacksonville, FL
    Posts
    39
    I have tried that method by creating an On Change Event on the WorkOrder field but have not been able to get it to work.

  5. #5
    abernut is offline Advanced Beginner
    Windows 7 32bit Access 2007
    Join Date
    Jan 2013
    Location
    Jacksonville, FL
    Posts
    39
    I think I have almost got it.
    Instead of using an On Change Event. I created two text boxes and set the control source =cboWorkOrder.Column(1) and =cboWorkOrder.Column(2).
    The boxes change like they are supposed to but now I get "The records cannot be deleted or changed because 'MoldLog' includes related records."

  6. #6
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,641
    Text boxes like that should have no effect on deleting records, as they aren't bound anyway. I suspect you already had that issue. Sounds like referential integrity is set up, and protecting you from orphaned records.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  7. #7
    abernut is offline Advanced Beginner
    Windows 7 32bit Access 2007
    Join Date
    Jan 2013
    Location
    Jacksonville, FL
    Posts
    39
    Quote Originally Posted by pbaldy View Post
    Text boxes like that should have no effect on deleting records, as they aren't bound anyway. I suspect you already had that issue. Sounds like referential integrity is set up, and protecting you from orphaned records.
    You are correct.
    I had to edit one of the relationships on another table.
    It now works as it is supposed to.

    Can I ask an unrelated question here about the same db or should I start a new post?

    Thanks,
    mike

  8. #8
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,641
    If it's unrelated it should be a new thread. It makes things easier on people searching for answers later.
    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. Replies: 1
    Last Post: 12-07-2012, 10:02 AM
  2. display/add new info on a form
    By dgamma3 in forum Access
    Replies: 1
    Last Post: 01-22-2012, 02:54 PM
  3. Replies: 3
    Last Post: 01-17-2012, 01:04 PM
  4. Replies: 3
    Last Post: 01-31-2011, 11:47 AM
  5. Replies: 13
    Last Post: 06-01-2010, 09:55 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