Hi John,

I need more help please.

Sorry this is so long.

I am having a lot of trouble getting my head around filters, etc.

I want a report that prints out assets that are  active, deleted or all
"Computers"  for a nominated centre or all centres.

I have a form in which there is a combo box from which the user can select a
centre. I also add "(All)" to the top of the list of centres, so effectively
the user can select all centres or an individual centre.

I also have an option group of check boxes called "optPrtOptions" (recognise
that?!!) from which the user can select to print

1 … active computers (ie deleted date IsNull)

2 … deleted computers (ie deleted date Is Not Null)

3 … all computers (no check on deleted date required)

I know there must be a better way, but I am going with what I can get
working.

The report was written first and uses a query called "qryComputerRegister"
It also has 2 subreports in it. I had a lot of problems getting
qryComputerRegister to select "Computers" for a given centre or all centres
so I wrote separate queries for selecting all computers off the assets table
and then using the resultant query to select computers for a given centre or
all centres.

I then replace "qryComputerRegister" with my resultant qry.

I now can successfully get all the computers for a given centre or all
centres.

But, now I want to incorporate the optPrtOptions and I thought I would be
able to do this using the WhereCondition as shown below.



Select Case Me!optPrtOptions

Case 1

DoCmd.OpenReport stDocName, acViewPreview, "",
"IsNull([qryComputerRegister]![DeletedDate])"

Case 2

DoCmd.OpenReport stDocName, acViewPreview, "",
"([qryComputerRegister]![DeletedDate])>0"

Case 3

DoCmd.OpenReport stDocName, acViewPreview

End Select

Case 1 gives me everything, including records where the deleted date Is Not
Null.

Case 2 gives me nothing, I suspect my _expression_ is wrong.

Case 3 gives me all computers which is correct

Can you please lead me in the right direction so that I can get this
working?

Thank you in anticipation

Ilona

Adelaide, Australia






[Non-text portions of this message have been removed]



SPONSORED LINKS
Microsoft access database Database development software Database management software
Database software Inventory database software Membership database software


YAHOO! GROUPS LINKS




Reply via email to