opening report by form!

C

Cillies

Hi,
I have an ongoing problem now, which I just can't seem to sort. I've
tried different approaches but can never get the form to bring back the
information that I need.

I tried this using the Like statement, but it won't return data for a
date and client search, nor will it return data for just a date
search.

HAVING (((Clients.CompanyName) Like [Forms]![Report Date
Range]![Client] & "*"))AND ((([Time Card Hours].DateWorked) Like
[Forms]![Report Date Range]![BeginDate] & "*" And ([Time Card
Hours].DateWorked) Like [Forms]![Report Date Range]![EndDate] & "*"));

My form has three textboxes *1.* BeginDate *2.*EndDate *3.*Client

I want to be able to do the following by just using the form to pull a
report generated by the information entered.

a) *Enter [Client] name, enter [BeginDate], enter [EndDate]*
View a Clients info between the dates entered in the BeginDate and
EndDate tectBoxes

b) *Leave [Clients] blank, enter [BeginDate], enter [EndDate]*
View all clients info btw'n the dates entered if [client] is left
Null.

c) *Leave [Clients], [BeginDate], [EndDate] empty.*
View all clients if dates and [client] are left Null

d) *Enter [Clients], leave [BeginDate] and [EndDate] empty*
View all of entered clients info, irrespective of date.

Is it possible to retrieve the information I have outlined above using
sql or would I be better using *VB* (not very good at VB)
I hope someone can Help.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top