Page 2 of 4 FirstFirst 1234 LastLast
Results 16 to 30 of 50
  1. #16
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521

    It would be in the after update event of the combo, in VBA. Here's how to get there:

    http://www.baldyweb.com/FirstVBA.htm
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  2. #17
    sidewayzalex is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Aug 2011
    Posts
    51
    Here are the images of the code and the 'code in action'

  3. #18
    sidewayzalex is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Aug 2011
    Posts
    51
    Haha... I think I know exactly what went wrong.
    I thought that I had to make a combo-field in the table. Just realized I could make a combo-box in a form. I am trying that now.


    This attempt did not work either.

  4. #19
    sidewayzalex is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Aug 2011
    Posts
    51
    Would it work better if I used [Parts per order Auto-Fill Test] instead of [Me]?

  5. #20
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Yes, it would be in a form, not the table. "Me" is a shortcut to the full name of whatever object the code is in, so it shouldn't really matter. More here:

    Forms Refer to Form and Subform properties and controls
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  6. #21
    sidewayzalex is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Aug 2011
    Posts
    51
    I am at a total loss as to how to resolve this issue. Would it be best if I start from scratch with this database as a reference?

    I feel like I have tried everything. It has to be the relationships that are messed up.

  7. #22
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Can you email me the sample db, since it won't post here?
    Last edited by pbaldy; 08-31-2011 at 02:56 PM. Reason: remove email address to prevent spam
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  8. #23
    sidewayzalex is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Aug 2011
    Posts
    51
    I just sent it to your email. Thank you.

  9. #24
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    The form you've discussed and pictured is not in the db you sent me.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  10. #25
    sidewayzalex is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Aug 2011
    Posts
    51
    It is, but it is my fault for not keeping the PartsPerOrder subform that we have been talking about on the database. I just made a quick form from form wizard from the Parts Per Order table.
    Ive been using that method for testing purposes. and then deleting the form if it fails.

  11. #26
    sidewayzalex is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Aug 2011
    Posts
    51
    Also, I apologize for not being here yesterday, I was in class and did not have access to this database.

  12. #27
    sidewayzalex is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Aug 2011
    Posts
    51
    Now... I'm looking at the Northwind sample database code, and I was wondering how this code worked?
    Function Generate(SupplierID As Long, ProductID As Long, Quantity As Long, OrderID As Long, PurchaseOrderID As Long) As Boolean
    Dim UnitCost As Long
    UnitCost = GetStandardCost(Nz(ProductID, 0))
    If Create(SupplierID, GetCurrentUserID(), OrderID, PurchaseOrderID) Then
    Generate = CreateLineItem(PurchaseOrderID, ProductID, UnitCost, Quantity)
    End If
    End Function
    and if there was any way that it would be doing what I was looking to do.

  13. #28
    sidewayzalex is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Aug 2011
    Posts
    51
    Now, just to be clear. If you play with frmBOM, that is the main form I am working on and looking for the improvements for.

    I am looking to keep the same general format of the frmBOM, but would like the following to be able to happen in the form.

    I would like to be able to select parts with a dropdown menu, by filtering them with a vender ID dropdown first. After choosing the partID, I would like the part's description and unit cost to auto-fill, and be stored in the database.

    I guess the question at this point is if that is possible, and if so, where do I start?

    Should I continue on with this database?
    Should I start from scratch, but use this one as a reference?
    Should I make another copy of this database so that I can delete all the relationships and work from there?

  14. #29
    welshmpf is offline Novice
    Windows XP Access 2007
    Join Date
    Aug 2011
    Posts
    8
    Hi,
    I am trying to do exactly this, I have managed to use a combo box to autofill another field i.e Description autofills Tariff Code both are fields on a table
    Form looks great , however I cant get the resultant info saved to the table
    if i put the contol source as Tariff Code , the text box does not populate
    my after update says Me.Tariff_Code = Me.Description.Column(1)
    Any help appreciated
    Mike

  15. #30
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Can you post the db?
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

Page 2 of 4 FirstFirst 1234 LastLast
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Auto Fill
    By Kerrydunk in forum Forms
    Replies: 16
    Last Post: 04-26-2011, 12:15 AM
  2. Auto Fill Issue #2
    By Swilliams987 in forum Database Design
    Replies: 9
    Last Post: 01-21-2011, 03:52 PM
  3. Auto-Fill
    By sophiecormier in forum Programming
    Replies: 3
    Last Post: 10-02-2010, 08:29 AM
  4. Auto-fill in datasheet
    By Terence in forum Database Design
    Replies: 2
    Last Post: 03-18-2010, 03:42 PM
  5. Auto Fill-In Capability?
    By bbarrene in forum Access
    Replies: 3
    Last Post: 01-15-2010, 08:35 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