rkrause
05-21-2008, 12:00 PM
Heres my query, what i wanted looked at is Iif line in my query.
strSQL = "SELECT tblDelinAcctListFormData_Temp.Letterhead, tblPDInv_Temp.CustId, tblPDInv_Temp.CustName, tblPDInv_Temp.OnHold, tblPDInv_Temp.Contact, " & _
"tblPDInv_Temp.Coll_Ext, tblPDInv_Temp.DateAcctOnHold, tblPDInv_Temp.Notes, tblPDInv_Temp.LastDateContactedLDC, tblPDInv_Temp.Coll_FollowupDate, tblPDInv_Temp.PaymentMethod, " & _
"tblPDInv_Temp.Phone, tblPDInv_Temp.Fax, tblDelinAcctListFormData_Temp.Region, tblDelinAcctListFormData_Temp.ActStat, " & _
"tblDelinAcctListFormData_Temp.NumPastDue, tblDelinAcctListFormData_Temp.TotDue, Iif([tblPDInv_Temp.invstat] = 16, [tblDelinAcctListFormData_Temp.TotDue] - [tblPDInv_Temp.InvAmt]) AS NewAmt " & _
"FROM tblPDInv_Temp " & _
"INNER JOIN tblDelinAcctListFormData_Temp " & _
"ON tblPDInv_Temp.CustId = tblDelinAcctListFormData_Temp.CustId " & _
"WHERE (((tblPDInv_Temp.CustId)='" & strCustID & "') AND (([InvAmt]-[AmtPaid])<>0));"
heres how the data is displayed on the form, except the "NewAmt" wont show up, anyone know why?
txtProgramType = !Letterhead
txtCustID.Value = !CustID
txtCustName.Value = !CustName
txtContact.Value = !Contact
txtPhone.Value = !Phone
txtFax.Value = !Fax
txtRegion.Value = !Region
txtTotalDue.Value = !TotDue
txtActStat.Value = !ActStat
txtColl_Ext.Value = !Coll_Ext
txtDateAcctOnHold.Value = !DateAcctOnHold
txtNotes.Value = !Notes
txtLastDateContacted.Value = !LastDateContactedLDC
txtCollFollowupDate.Value = !Coll_FollowupDate
txtPymtMethod.Value = !PaymentMethod
txtNewTotal.Value = !NewAmt
strSQL = "SELECT tblDelinAcctListFormData_Temp.Letterhead, tblPDInv_Temp.CustId, tblPDInv_Temp.CustName, tblPDInv_Temp.OnHold, tblPDInv_Temp.Contact, " & _
"tblPDInv_Temp.Coll_Ext, tblPDInv_Temp.DateAcctOnHold, tblPDInv_Temp.Notes, tblPDInv_Temp.LastDateContactedLDC, tblPDInv_Temp.Coll_FollowupDate, tblPDInv_Temp.PaymentMethod, " & _
"tblPDInv_Temp.Phone, tblPDInv_Temp.Fax, tblDelinAcctListFormData_Temp.Region, tblDelinAcctListFormData_Temp.ActStat, " & _
"tblDelinAcctListFormData_Temp.NumPastDue, tblDelinAcctListFormData_Temp.TotDue, Iif([tblPDInv_Temp.invstat] = 16, [tblDelinAcctListFormData_Temp.TotDue] - [tblPDInv_Temp.InvAmt]) AS NewAmt " & _
"FROM tblPDInv_Temp " & _
"INNER JOIN tblDelinAcctListFormData_Temp " & _
"ON tblPDInv_Temp.CustId = tblDelinAcctListFormData_Temp.CustId " & _
"WHERE (((tblPDInv_Temp.CustId)='" & strCustID & "') AND (([InvAmt]-[AmtPaid])<>0));"
heres how the data is displayed on the form, except the "NewAmt" wont show up, anyone know why?
txtProgramType = !Letterhead
txtCustID.Value = !CustID
txtCustName.Value = !CustName
txtContact.Value = !Contact
txtPhone.Value = !Phone
txtFax.Value = !Fax
txtRegion.Value = !Region
txtTotalDue.Value = !TotDue
txtActStat.Value = !ActStat
txtColl_Ext.Value = !Coll_Ext
txtDateAcctOnHold.Value = !DateAcctOnHold
txtNotes.Value = !Notes
txtLastDateContacted.Value = !LastDateContactedLDC
txtCollFollowupDate.Value = !Coll_FollowupDate
txtPymtMethod.Value = !PaymentMethod
txtNewTotal.Value = !NewAmt