Jumat, 30 Desember 2011

RE: [MS_AccessPros] Adding a IIF statement for a date query

 

Art-

In the Control Source for txtBillDueDate put:

=IIf([BillDueDate] < Date(), "OVERDUE", Format([BillDueDate], "mm/dd/yyyy")

John Viescas, author
Microsoft Office Access 2010 Inside Out
Microsoft Office Access 2007 Inside Out
Building Microsoft Access Applications
Microsoft Office Access 2003 Inside Out
SQL Queries for Mere Mortals
http://www.viescas.com/
(Waco, Texas <yee haw>)

-----Original Message-----
From: MS_Access_Professionals@yahoogroups.com
[mailto:MS_Access_Professionals@yahoogroups.com] On Behalf Of Art
Sent: Friday, December 30, 2011 2:08 PM
To: MS_Access_Professionals@yahoogroups.com
Subject: [MS_AccessPros] Adding a IIF statement for a date query

I have the following query:

SELECT tblVendorTransaction.VendorTransID, tblVendorTransaction.VendorID,
tlkpTransactionType.TransactionTypeName, tblVendorTransaction.BillDate,
tlkpAccountType.AccountTypeName, tblVendorTransaction.Memo,
tblVendorSubTrans.Amount, tblVendorSubTrans.UnitID,
tblVendorTransaction.BillDueDate
FROM ((tblVendorTransaction INNER JOIN tblVendorSubTrans ON
tblVendorTransaction.VendorTransID = tblVendorSubTrans.VendorTransID) LEFT JOIN
tlkpTransactionType ON tblVendorTransaction.TransactionTypeID =
tlkpTransactionType.TransactionTypeID) LEFT JOIN tlkpAccountType ON
tblVendorSubTrans.AccountTypeID = tlkpAccountType.AccountTypeID;

This is the record source for a continuous form. On the form I have a field
called txtBillDate. WHat I am trying to do is if the BillDueDate is less than
todays date then in txtBillDueDate enter OVERDUE otherwise display the
BillDueDate.

Is this possible?

Thanks,

Art Lorenzini
Sioux Falls, SD

------------------------------------

Yahoo! Groups Links

__._,_.___
Recent Activity:
MARKETPLACE

Stay on top of your group activity without leaving the page you're on - Get the Yahoo! Toolbar now.

.

__,_._,___

Tidak ada komentar:

Posting Komentar