Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Query help checking required

Status
Not open for further replies.

robcarr

Programmer
May 15, 2002
633
GB
Hi,

I am using the code below to find a record

Code:
SELECT tblItemReceived.ReferenceNo, tblItemReceived.DateLogged, tblItemReceived.TimeLogged, tblItemReceived.LoggedBy, tblItemReceived.ItemType, tblItemReceived.CustomerRef, tblItemReceived.DateClosed, tblItemReceived.ClosedAs, tblItemReceived.TimeClosed
FROM tblItemReceived
WHERE (((tblItemReceived.ReferenceNo)=[Enter Reference Number to Find]));

is there a way to add a check and if the tblItemReceived.ClosedAs is blank then open form, else dont open it, also if the tblItemReceived.ReferenceNo doesnt exist dont open. if exists open form.

Hope this is of use, Rob.[yoda]
 
If you are using a recordset do it something like this:
Code:
If Not IsNull(rs!ClosedAs) then
[green]'open form[/green]
else
[green]'do some other checking[/green]
end if
Hope this helps

Harleyquinn

---------------------------------
For tsunami relief donations
 
You cannot issue commands within a query.
I think you need to consider basing the form you refer to on a query which selects just the records for which ClosedAS is null.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top