Skip to Content
0
Former Member
Aug 01, 2007 at 09:20 PM

Code needed to show availability of resources via reservation database

26 Views

Post Author: BeckyS

CA Forum: Formula

I have an Access database where people can check out items to use. The basic table looks like this.

num

Employee

check_out

planned return

laptop

camera

projector

1

RES

7/28/07

7/28/07

TRUE

FALSE

FALSE

2

DJJ

7/21/07

7/24/07

TRUE

FALSE

TRUE

3

KLV

8/1/07

8/3/07

FALSE

FALSE

TRUE

4

CW

7/31/07

8/2/07

FALSE

TRUE

FALSE

In Crystal, I want to look at dates, starting with today' s date that tells me if the item is available or not. Something like this.

08/01/2007

laptop 1

Available

camera

Not Available

projector

Not Available

08/02/2007

laptop 1

Available

camera

Not Available

projector

Not Available

08/03/2007

laptop 1

Available

camera

Available

projector

Not Available

I set up a date table as group 1, then each of the objects as groups underneath that. The code I wrote looks like this, but it isn't working.

If {DateTable.Date}>={Check_Out_Table.Check_Out}and {DateTable.Date}<={Check_Out_Table.Planned_Return}and {Check_Out_Table.Camera}= truethen "Camera is unavailable"else "Camera is available"

HELP!