Link to home
Start Free TrialLog in
Avatar of SteveL13
SteveL13Flag for United States of America

asked on

AfterUpdate Issue

I have a form which contains a combo box.  When the user selects a record from the combobox, an afterupdate event takes place to autopopulate 29 fields on the form.  But it seems to NOT populate fields if a field value is empty.  Or at least I think that is the problem.  Up to the point of the empty field all is ok, but after that point, not fields seem to populate.  Here is the code for the after update event.  Can someone tell me what I'm doing wrong?

    Me.txtCustomer_1 = Me.txtPart_No.Column(1)
    Me.txtPatterns_On = Me.txtPart_No.Column(2)
    Me.txtPattern_Type = Me.txtPart_No.Column(3)
    Me.txtFlask_Size = Me.txtPart_No.Column(4)
    Me.txtPatt_Loc = Me.txtPart_No.Column(5)
    Me.txtCBs = Me.txtPart_No.Column(8)
    Me.txtCPC = Me.txtPart_No.Column(9)
    Me.txtMetal = Me.txtPart_No.Column(10)
    Me.txtHeatTreat = Me.txtPart_No.Column(11)
    Me.txtPaint = Me.txtPart_No.Column(12)
    Me.txtWeight_Cstg = Me.txtPart_No.Column(13)
    Me.WghtEst = Me.txtPart_No.Column(14)
    Me.txtWeight_Mold = Me.txtPart_No.Column(15)
    Me.txtSI = Me.txtPart_No.Column(16)
    Me.txtRemarks = Me.txtPart_No.Column(17)
    Me.txtRemarks_2 = Me.txtPart_No.Column(18)
    Me.txtBrinell = Me.txtPart_No.Column(19)
    Me.txtCert = Me.txtPart_No.Column(20)
    Me.txtPriceRem = Me.txtPart_No.Column(21)
    Me.txtQualityRem = Me.txtPart_No.Column(22)
    Me.chkbxBlanketOrd = Me.txtPart_No.Column(23)
    Me.txtMachining = Me.txtPart_No.Column(24)
    Me.txtChillNcombined = Me.txtPart_No.Column(25)
    Me.txtRev = Me.txtPart_No.Column(26)
    Me.chkbxInclSC = Me.txtPart_No.Column(27)
    Me.chkbxSerialize = Me.txtPart_No.Column(28)
    Me.txtOPother = Me.txtPart_No.Column(29)
   
    Me.txtCores_Type = getLevels(Me.txtPart_No.Value)
    Me.txtCB_Loc = getLocations(Me.txtPart_No.Value)

--Steve
Avatar of GRayL
GRayL
Flag of Canada image

why are you calling a combo box txtPart_no?
Avatar of SteveL13

ASKER

I had mis-named it way back when it was developed.  I should have named it cboPart_No.  But does the name matter?
No, but it sure throws troubleshooting for a loop.
BTW, you are aware that the column index is 0 based? ie.  the first value of the column array is column(0)?
Yes.  But column (0) is actually the Part no which does not need to be populated to any field because that is the key being selected from the combobox.
Avatar of DockieBoy
DockieBoy

What is the record source for the combo?
It is tblPartsMasters
Sorry, should have asked before if you can upload the db.
ASKER CERTIFIED SOLUTION
Avatar of DockieBoy
DockieBoy

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial