
February 12th, 2004, 08:14 AM
|
|
Registered User
|
|
Join Date: Feb 2004
Posts: 8
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
|
opening report by a form
Hi, 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.
|