Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 2012
    Posts
    68

    Unanswered: test box updates on other tabs correctly, but not this one

    So i have a form that is composed of tabs (attached form). Shown is the material entry tab which is the one i am having problems on. Here is the code:

    Code:
    Private Sub Material_AfterUpdate()
    
        Category = DLookup("[Categoryid]", "inventory", "[Material] ='" & Me.MATERIAL & "'")
        upcombo = DLookup("[Unit Price]", "inventory", "[Material] ='" & Me.MATERIAL & "'")
        per = DLookup("[perid]", "inventory", "[Material] ='" & Me.MATERIAL & "'")
        Class = DLookup("[classid]", "inventory", "[Material] ='" & Me.MATERIAL & "'")
        
    End Sub
    If the Material Combo is updated (rowsource "Inventory Table", "[material]") then most of the other boxes us dlookup to fill in the data. When i update the material combo with a certain record the Unit Price combo does not show the correct pricing. On the other hand if i go to the New / Lookup In. tab ( attached form2) and use the same steps the correct pricing shows for all records.

    I have been at this for awhile. Any ideas?
    Attached Thumbnails Attached Thumbnails form.bmp   form2.bmp  
    Last edited by bsigmon1103; 03-20-12 at 20:27.

  2. #2
    Join Date
    Mar 2012
    Posts
    68
    resolved!!!!

  3. #3
    Join Date
    Feb 2004
    Location
    New Zealand
    Posts
    1,422
    Provided Answers: 7
    A tip

    In the combo box list the other fields make then 0 width then you can use the per=me.material.column(number)

    System will be a bit smarter faster
    hope this help

    See clear as mud


    StePhan McKillen
    the aim is store once, not store multiple times
    Remember... Optimize 'til you die!
    Progaming environment:
    Access based on my own environment: DAO3.6/A97/A2000/A2003/A2007/A2010
    VB based on my own environment: vb6 sp5
    ASP based on my own environment: 5.6
    VB-NET based on my own environment started 2007
    SQL-2005 based on my own environment started 2008
    MYLE
    YOUR PASSWORD IS JUST LIKE YOUR TOOTHBRUSH DON'T SHARE IT.

Posting Permissions

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