i ma building a database for my boss, and everything was going somewhat smoothly until i got to parameters in my queries...
i have a date parameter in one query that reads, "enter date to view"
that worked fine, but now, whenever i make another query, even if it uses different parameters, when i run the query, the "enter date to view" appears, followed by the real paramater...
I have a form whose data source is a select query, q3, that is built from 2 other select queries. I'll call them q1, q2, and q3. q1 is a parameter query where I enter a "Cutoff Date" that the 3 queries manipulte and generate the desired results that appear in the form. The problem is that I don't know how to capture the parameter "Cutoff Date" from q1 to display on the form.
I have a query that requires a Start-Date and an End-Date to be input by user for the Where clause. It is asking for both over and over. I've had it ask from 1 up to 4 times! :eek: Shouldn't it store the input and only ask for it once? I'm thinking that the way my query is arranged may be causing it to have to loop through that section more than once to find the data, but that's just my theory. Any help would be great!
Here is my code (abbreviated slightly):
SELECT DISTINCTROW C1.*, C2.* FROM Pen AS C1 INNER JOIN Jobs AS C2 ON C1.subno=C2.[Jobs Acct] WHERE ((C1.typ="SS" Or C1.typ="CC" Or C1.typ="PP" Or C1.typ="TT") And C1.stdate>=[Enter Start Date] And C1.stdate<=[Enter End Date] And C2.[Type]<>"EE" And C2.[Type]<>"QQ" And C1.entdate<=C2.[ChangeDate]+60);
I'm selecting rows from "Pen" and "Jobs" that have the same subno/Jobs Acct numbers (text), then there are criteria for "Pen" types, user inputs criteria for date range (Start Date and End Date) and there are criteria for "Jobs" types. Finally, there's a cross-table criteria based on a date field ("Pen" entdate should not be more than 60 days past the "Jobs" ChangeDate). Tables are in quotes in my explanation here.
So running the above, it asks for user input "Enter Start Date", then again for "Enter End Date"...but then it asks for each again...and again...and sometimes again!
Help! :confused:
P.S..I didn't notice this repeating until I made it user input (parameter query) because it was using whatever dates I hard-coded in there before.
I am creating a database for work and I keep getting a message that pops up when I opn my form that says "tblClientBFinfo.ClosedReason". Then there is a place to enter a value and and it says "ENTER PARAMETER VALUE." I know it is a problem with one of my tables, specifically the "closed reason" field in the table. But I odn't know why it is asking me to enter a parameter value. Could anyone offer help?
I need a new parameter in my query. When I open the query i need the parameter to be asked in a combo box or drop down box or any way to select the value from the groupo other than typing.
I want to run a query automatically in the gotfocus event of a field within a form. Prior to the gotfocus, a value is entered in an unbound text box on the form and I want to use that value for the maximum value in the parameters. I will set the minimum to zero.
My code errors in the where, it has no problem with the serial number but I can't seem to set the deliv_no to pull the value entered on the form.
SELECT Sum(VOLTEST.unc_del) AS SumOfunc_del FROM VOLTEST WHERE (((VOLTEST.SERIAL_NO)=[Forms]![largeVolume1]![serial]) AND ((VOLTEST.DELIV_NO)>0 And (VOLTEST.DELIV_NO)<=([Forms![largeVolume1]![No_del])));
I figure this is a syntax problem. Can you guys see where I have gone wrong?
I need the value to write to the table, not the form when this runs.
In my chart I have a yes/no field that I would like to set up a query to for. I want the user to be able to input yes or no and then the data be displayed. Whenever I enter yes or no when the prompt comes up, I get an error saying the expression is typed incorrectly or the data is too complex. How do I set it up so the user can select yes or no in some way? thanks
Hi all.I have a form that links to another form using the following macro "[homerid]=[Forms]![Homer Input]![homerid]" so when I click on form 2 the homerid from form 1 is automatically displayed. However on my switchboard I have a direct link to my Form 2 but when I click on this i get a box come up which is titled "enter parameter value" and then the subtitle is "[homerid]=[Forms]![Homer Input]![homerid]", this is fine, but I would like to change the subtitle to something i write myself such as "please enter homerid". Is their a way of doing this? Thanks.
I have been programing SQL for almost 3 years now but, am a newbie with access. I have just added a field to a form used by employees to enter time and am getting a parameter request when the user clicks Add Entry. I placed a msgBox before the insert line and noticed the field data (type memo) is being sent by the insert query as an integer (without quotes). Any ideas how I might get the insert to pass the Comments field as a string?
Thanks,
~Leo
Private Sub AddTimesheet()
On Error GoTo Err_AddTimesheet
Dim db As DAO.Database Dim rst As DAO.Recordset Dim strSQL As String ' Set db = CurrentDb() '
Set rst = db.OpenRecordset( _ strSQL, dbOpenDynaset, dbReadOnly)
' With rst
If Not .EOF Then
MsgBox ("Time sheet for this employee, category, and week already exists. Please click the record at the bottom of the screen to edit.") Exit Sub End If
I do not know what I did but now when I open my database it asks me over and over again to "enter parameter value" and it won't let me open the database like normal. Please help!
Hello, I am designing a query as i have been advised in the following Quote: Doc ManNow, you write a couple of queries. As a parameter to the queries, choose a date that will be your archiving cutoff or split point. Usually the last day of some month or quarter. Doesn't matter as long as you are consistent about it. The technical cutoff will be, in effect, 23:59:59 of the chosen date. The first record to be KEPT will be 00:00:00 of the next day in sequence.
Query #1 - Compute stock on hand as of your cutoff date. Create a single stock-on-hand transaction with the cutoff date. Put it in a temporary table until you need it. This will be a two-layer query. I.e. a query of a query.
Query #1A - a summation query grouped by item number for all transactions earlier than the archiving date so you can get the "inventory of X at archiving date"
Query #1B - an append query that draws from the summation query and feeds it to the temp table. The stock-on-hand record will have the archiving date
. I am able to get "inventory of X at archiving date" and append the results to a temporary table but I can't see how to append the "archiving Date" data itself to the same table as the "Archiving date" is entered via parameter prompt? Any ideas?
Hi! When I run a querry I have a parametr querry like this: Between[FirstDate] and [LastDate]
I want to "catch" the FirstDate and LastDate from the parameter querry and place them in the head of the Report based on the same querry. How do I do this????
When using parameters from one form to the next I normally hide the form and then reference the parameter textboxes in the next form to the hidden form. Is there a better way of doing this as I saw threads here mentioning passing a parameter. How do I do this? Thanks!
I have a bunch of queries put in 1 macro. Of course, some queries have the same parameter [Enter current monthend] so when I run a macro, there are few popups asking to [Enter current monthend]. It’s annoying for users to put in the same parameter 2 or 3 times for a report. Is there a way to avoid it?
I tried to make [Enter current monthend] as a new_field so the 2nd query could pick up new_field instead of [Enter current monthend] again but that gave me an error b/c the new_field automatically has ‘binary’ datatype instead of ‘date’ datatype. How can I fix this?
I have a form and it is related with a query and by clicking ok I got the required results in Access 97. But now I have converted to Access 2002 and whenever i enter values in the form and click ok I get a Dialog Box "Enter Dialog Box". I read MKB article but it did not help me at all. Please help me out I am not getting any idea at all to solve this problem?
How can I check the Parameter query interval is out of range? Details:
I have a table with Date column. With parameter query(by Date field) I extract records between two dates. How could I make a check when taping in Inputboxes, am I or Not Between the Last and the First Date?
I'm writing a query which when run will prompt the user to enter criteria. In this case it is a workers id (like 000UA or 000UB)
My problem is I would like to have the ability to enter more than one criteria. What I want to do is to have the ability to enter several worker id's in the criteria field, like 000UA, 000UB, 000UC, 000UD, 000VA, 000VB, 000VE, 000VF, 000WA, 00WB
Is this possible and can someone explain to me how to do it?
I am trying to run a parameter query that will prompt the user for "facility", but instead of displaying the results in table format, I want a form to display the results. I have already developed the form. I would also rather for the users to search by a list box instead of typing the facility. I cannot seem to figure this out. Please help.
I am having problems finding a solution to this problem. I am working on 3 databases at the moment..and am at the final hurdle to complete it. I have built an Access database. I would like to generate a number of reports which have to be exported directly into excel individually.
I have a parameter query with 14 columns. One of the columns is called GROUPS. I have a form with a button. When you click on the button the parameter query asks for the parameter value.
The parameter value must be a GROUP. i.e BURR, WIEN.
After you enter the group the parameter query generates results for that particular group.
I have a number of groups which i would like to generate results for at the click of the button on the form.
There are around 30 groups. but i only need to generate reports for about 15 groups. The groups are stored in one of the tables.
So for instance after i click a button on the form the results for each requested "GROUP" are exported individually into excel.
Each group result must be in one excel file.
How can i achieved this. Do i need to use VBA? Please can you help. I need a solution then i can apply this to a number of databases
I have a parameter-query and when you execute it and 'fill in' the parameter it takes a very very long time when the results are displayed on the screen.
Now, that seems normal if you have a very large table, but when I enter the parameter in the criteriafield manually it displays the results immediately. Very strange. I have indexed the field so that cannot be the problem.