I'm back again.
Of course, when I figure out one part of what I need to do, I need to make it better.
I'm trying to add an option to select a date range to report on, but it's not working how I think it should be.
Here's the peice of SQL that relates for my query.
WHERE (PagesHistory.ReviewStartTime) Between ([Forms]![ReportsForm]![StartDateTXBX]) And ([Forms]![ReportsForm]![EndDateTXBX]))
Did I make an error somewhere?
6 1365 ChipR 1,287
Recognized Expert Top Contributor
Try this:
WHERE PagesHistory.ReviewStartTime BETWEEN
Format ([Forms]![ReportsForm]![StartDateTXBX], "short date") AND
Format ([Forms]![ReportsForm]![EndDateTXBX], "short date")
Still getting a "Enter Paramater Value" box for the Start and End Date.
I tried displaying the date fields in a text box on a report, and it came up as "#Name?"
For what it's worth, here's the entire query:
SELECT Roles.LastName, PagesHistory.ReviewStartTime, PagesHistory.ReviewEndTime, DateDiff("s",[PagesHistory.ReviewStartTime],[PagesHistory.ReviewEndTime]) AS TimeSpent
FROM PagesHistory INNER JOIN Roles ON PagesHistory.RoleID = Roles.ID
WHERE (((PagesHistory.ReviewStartTime) Between Format([Forms]![ReportsForm]![StartDateTXBX],"Short Date") And Format([Forms]![ReportsForm]![EndDateTXBX],"Short Date")) AND ((PagesHistory.ReviewEndTime) Is Not Null) AND ((DateDiff("s",[PagesHistory.ReviewStartTime],[PagesHistory.ReviewEndTime]))>0));
Do I need to join anything to pull data from forms?
ChipR 1,287
Recognized Expert Top Contributor
What's the source you're using for the text box on the report that shows #Name? Something is wrong in the way your are trying to point at the form data, but it could be anything from the name of the box being misspelled to the form not being open at the time.
Yeah I don't really get why it's not working in the text boxes in the report
=Format([Forms]![ReportsForm]![StartDateTXBX],"Short Date")
is what I'm using
ChipR 1,287
Recognized Expert Top Contributor
Try in the immediate window
? Format (Forms!ResportsForm!StartDateTXBX, "Short Date")
or put a button on your form and have it do
MsgBox Format (Forms!ResportsForm!StartDateTXBX, "Short Date")
and see what you get. I suspect that something is simply being referred to by the wrong name.
Another bonehead mistake on my part lol
I used your idea of throwing in a msgbox and it told me that ReportsForm didn't exist... which I know it does!
...it's a subform of a form I wasn't including in the command >.<
Anyways, problem solved, thanks again, ChipR!
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Rene |
last post by:
I have a master "attendance" report that also has two "attendance"
sub-reports...each collecting data from a different group...and
totaling
those present at the end. I chose sub-reports because...
|
by: Afton |
last post by:
I would like to make a form that filters a report by Supervisor and by
starting and ending date.
I have the supervisors in a combo box, and that works.
However, I do not know how to code to let...
|
by: StBond |
last post by:
Hi everyone,
I am new to Access and Visual Basic so things my be getting across a
bit cloudy. I only started using VB for one week.
I am having a little problem with the database that I am...
|
by: Rob Woodworth |
last post by:
Hi,
I'm having serious problems getting my report to work. I need to
generate a timesheet report which will contain info for one employee between
certain dates (one week's worth of dates). I...
|
by: Jimmy |
last post by:
I have a form with a command button on it that is supposed to open up a
report and use a query to populate it.
DoCmd.OpenReport "rptMailingList", acViewPreview, "qryMailingListChristmas"
...
| |
by: mukeshhtrivedi |
last post by:
Hi Gurus,
I have created simple query as
SELECT QUOTES.DATE, QUOTES.QUOTENO, QUOTES.SALESREP, QuoteItem.ITEM,
QUOTES., QUOTES.CUSTOMER, QUOTES.AMOUNT, QUOTES.,
QUOTES.DivisionID,...
|
by: Cara Murphy |
last post by:
Hi There!
Hoping you are able to help me with a filtering scenario:
I have created a pop up form (Filter) to filter a report (Open Issues), which currently has a number of combo boxes which...
|
by: Fred's |
last post by:
Hi Folks,
I have a report which the record source is a query name: Query3 and in
my Query3 I have this parameter "between And ".
Therefore, when I open my report, it will ask for a Start Date...
|
by: smithj14 |
last post by:
I have a form that has an option group (fraReports) which holds a list of reports to print. This part works fine. I select a report name and click print and that report opens.
Now I want to add a...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
| |
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...
| |