Thanks Allen , Just cant get it to show Overdue . My Combo box is the result
of this Query
MyDate is Column 7 and MaxOfBillDate is Column 8
Thanks for the help...Bob
SELECT tblOwnerInfo.OwnerID,
IIf((Nz(qTotalDueForPayment.TotalDue,0)-Nz(qPaidAmountForPayment.PaidTotal,0))>1,0,1)
AS SortVal,
IIf(IsNull(tblOwnerInfo.OwnerLastName),'',tblOwnerInfo.OwnerLastName & ', ')
& " " &
IIf(IsNull(tblOwnerInfo.OwnerFirstName),'',tblOwnerInfo.OwnerFirstName) AS
Name, qTotalDueForPayment.TotalDue AS DueAmount,
qPaidAmountForPayment.PaidTotal AS Paid,
Nz(qTotalDueForPayment.TotalDue,0)-Nz(qPaidAmountForPayment.PaidTotal,0) AS
Payable, IIf(Not IsNull(),"e") AS EmailAlert1,
Format([MaxOfBillDate],"d-mmm-yy") AS MyDate,
qPaidAmountForPayment.MaxOfBillDate,
IIf(IsNull(tblOwnerInfo.OwnerLastName),'',tblOwnerInfo.OwnerLastName & ', ')
& " " &
IIf(IsNull(tblOwnerInfo.OwnerFirstName),'',tblOwnerInfo.OwnerFirstName) AS
NameTest
FROM (tblOwnerInfo LEFT JOIN qPaidAmountForPayment ON tblOwnerInfo.OwnerID =
qPaidAmountForPayment.OwnerID) LEFT JOIN qTotalDueForPayment ON
tblOwnerInfo.OwnerID = qTotalDueForPayment.OwnerID
WHERE (((tblOwnerInfo.Status) Like 'Active*'))
ORDER BY
IIf((Nz(qTotalDueForPayment.TotalDue,0)-Nz(qPaidAmountForPayment.PaidTotal,0))>1,0,1),
IIf(Not IsNull([Email]),"e") DESC ,
IIf(IsNull(tblOwnerInfo.OwnerLastName),'',tblOwnerInfo.OwnerLastName & ', ')
& " " &
IIf(IsNull(tblOwnerInfo.OwnerFirstName),'',tblOwnerInfo.OwnerFirstName);
[QUOTE="Allen Browne"]
Right-click the label and Change To | Text Box.
It now has a Control Source, which you can set to an expression such as
this:
=IIf(DateDiff("d", [cmbClientsDue], Date()) Between 30 And 60, "Overdue",
Null)
This assumes that the bound column of the combo is actually a date/time
value. If the combo is unbound, set its Format property to (say) Short
Date, so Access knows the data type.
It is possible to code the visible property of a label, but that's slower,
and doesn't work on a continuous form.
--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.
[QUOTE="Bob V"]
My Label [lblOverdue] in set to No Visible on my form, When I select my
Combo Box [cmbClientsDue] and the 8th Column shows a date more than 30
days but less than 60 days I want my label to appear, Any Help
Please............Bob[/QUOTE]
[/QUOTE]