Topics Search

How Do I Get A Calendar Into A Query Parameter

How Do I Get A Calendar Into A Query Parameter
Views: 265
I wrote a query which prompts entry of a start date and an end date, thus the user has to type into the parameter box. The date field is called When, and the table is called Scrap_Q4. Here is the SQL language

SELECT Scrap_Q4.REJ, Scrap_Q4.When, Count(Scrap_Q4.REJ) AS CountOfREJ
FROM Scrap_Q4
GROUP BY Scrap_Q4.REJ, Scrap_Q4.When
HAVING (((Scrap_Q4.REJ) Between 108 And 132) AND ((Scrap_Q4.When) Between [start date] And [end date]))
ORDER BY Scrap_Q4.REJ, Count(Scrap_Q4.REJ);

I want to replace the parameter box from popping up with a calendar which will alow the user to click on a start date and an end date. This will eliminate typing and potential error
Sponsored Links:

Similar posts...


Calendar/ Query help

Calendar/ Query help Icon
I need some coding help in setting up a calendar for multiple selections and then placing a continue button on the calendar for an on click event the uses the queries. I have an example of code that has been used in a calendar event before.

I have added in the query names I will be using and the main form to be opened.

Parameter query to show all if nothing is entered

Parameter query to show all if nothing is entered Icon
I need to build a parameter query to show parameter results if something is imputed but if nothing is imputed I need the query to show all records. I also need it to be on a query with multiple parameters. But Jack Cowley had posted a response telling another to use a query by form with a query def. I Am not very knowledgeable with this and would like to know if there is another way? Maybe setting the query up with parameters set and then building an expression after that would prompt each parameter to display all records if no criteria is imputed into parameter box

Passing Parameters to a Query Without Parameter Prompts

Passing Parameters to a Query Without Parameter Prompts Icon
I have a query that requires a parameter to work. I need to pass a form field (entered by the user) to the query as the parameter, but I don't want the parameter box to pop-up asking the user for input when the button is clicked to run the parameter.

I tried using DoCmd.RunSQL, but, if I understand correctly, this can't be used for a select statement. I used it with updating and inserting with no problems.

I'm trying to use qdf.Parameters() now, but I still get the popup. Is there a way to pass parameter without the parameter prompts?

Parameter Queries in Crosstab Query

Parameter Queries in Crosstab Query Icon
I created a parameter query, and then I created a crosstab query based on the first parameter query. I keep getting an error message that says: "The Microsoft Office Access database engine does not recognize '[start date]' as a valid field name or expression."

In more detail:
I created a query where I have a pop up parameter box that asks for the start date and another asking for the end date. The parameter is written in the criteria as follows:

Between [start date mm/dd/y] and [end date mm/dd/y]

When I run the query, the parameter query works beautifully.

So then, I ran a crosstab query based on the (first) parameter query hoping that it would pull the parameter query forward, but it didn't, I got the error message instead.

ActiveX parameter in ASP

ActiveX parameter in ASP Icon
How can I reference an ActiveX parameter in ASP to facilitate a query for a database. I want to use the activex calendar to be a variable which filters a database query

Refresh Query using Value on Form?

Refresh Query using Value on Form? Icon
I have a parameter query where it asks the user for an order number which then displays the parts on that order on the form.

Due to a new feature, I would like to refresh that query without having to reenter the query parmeter.

Can I refresh a parameter query using a previously entered value as the parameter value?

This query is the record source for a form so I was not wanting to change this, but pass a value into the parameter required to run the query

Run query from calendar control

Run query from calendar control Icon
I am wondering if it is posible to run a query from the Access Calendar control?

what I am trying to achive is.

when a date is selected from the calendar it will show the query results in a datasheet or some other type in the same form?

can anyone advise what is the best way to approach this?

Get information from a calendar to a query behind a form

Get information from a calendar to a query behind a form Icon
I have just about given up on the calendar thing. Can't seem to get them to work.

How I get information from a calendar to a query behind a form that will display closed problems for a chosen month. The calendar form currently has date and year and no multiple date sections without using a global. Do I need a dialog form?

DatePicker and Parameter Query

DatePicker and Parameter Query Icon
I have a query which members of this forum have (very graciously) helped me develop (please see [LINK] for details on my DB and on the parameter query in question).

I would like to add one thing to the "design" of the query; I would like to have a DatePicker pop up to enter the parameter instead of the default parameter-entry dialog box. Everything I have read on the web says I cannot do this directly through the query.

Instead, it seems I must first create an unbound form (frmStart_Schedule) using a TextBox (cboDatePick) with format set for Date/Time to provide the parameter for the query.

What I am having trouble with is having the SQL code "point" toward the value entered in cboDatePick in order to run the query (which contains the user-defined function DoReview,

Query parameter from 6am-6pm

Query parameter from 6am-6pm Icon
How do you make a parameter query data from 6:00 AM to 6:00 AM daily? What I meant is How to put it in the parameter query to include date and time?