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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

If And statements

Status
Not open for further replies.

Cillies

Technical User
Feb 7, 2003
112
0
0
GB
Hi all,

I am having difficulty writing an If & And statement

I am building a DB using Microsoft Access. What I want to do is write an if statement that will tell the user that a video has not been returned by the customer that is currently trying to rent another video.

My entities are:
[Return Date] Date field
[Returned] Yes/No check box

What I was thinking of was using the Date() function where if [Return Date] <= Todays Date And [Returned] = false then a message box would appear MsgBox "A movie has not been returned"

Hope someone can help.

Many thanks in advance
 
write an if statement
Where ? in a query ? a form ? a report ?

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Sorry about that. its for a subform based on a query. The two fields are from the same table [Loan] within the query
 
You may consider a conditional format in the subform with an expression like:
[Return Date] <= Date() And [Returned] = False

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Hi PHV,

Thanks for your help, that’s works perfectly, but is there anyway of bringing up a message box to further indicate to the user that a movie has not been returned. Sorry if I'm being a nuisance.

Kind regards
Cillies
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top