Parameter Field In Query

Oct 27, 2005

Hi All

I have set a parameter in a query on a number field.

When I run the query it lists all entries relating to the number I enter.

Once I have ran the query by either opening the query or clicking on the datasheet view when I am in design view, is there a way that I can re-run the query from the datasheet view with a new parameter without having to either close and re-open the query or go into the design view and click on datasheet view again?

Surely there must be a way.

I'd appreciate anybody's help on this.

View Replies


ADVERTISEMENT

Parameter Query On Calculated Field

Apr 17, 2007

I hope someone can help as I am stumped at present. I have created a calculated query using dateadd. I have a table that has date fields, ServiceContractAgreed and ServiceFrequency. The service frequency field holds a value of 3,6,9 or 12 in months. Using dateadd I can add the months to the ServiceContractAgreed field in a field called NextService, ie =IIf(IsNull([ServiceContractAgreed]),"N/A",DateAdd("m",[ServiceFrequency],[ServiceContractAgreed]))
This works fine but what I want to do now is create a parameter query to search the NextService field, using the between operator to search between dates. I've created a new query to do this but get every record back, no matter what dates I put in. It's probably something really simple to do but I'd be really grateful for any advice!

Cheers

Dave

View 2 Replies View Related

Queries :: Parameter Query To Get Field

Feb 7, 2014

I have a table which has 8 fields. The task is to design a query which always shows the first two fields (or any other two specific fields) and any one of the remaining 6 fields based on the input from the user. I am using a simple form with combo boxes to get the choices from the user.

View 11 Replies View Related

How Can The Field On The Current Form Be Used As A Parameter For A Query?

Dec 21, 2007

Hi-

I have an Access DB with several different forms all relating to one master table.

Each record in the table can be resolved=yes or resolved=no.

Right now each user must click the resolved box to resolve the entry and then enter the date.

I have created a button that will run the update query below.

UPDATE [TBL Master] SET [TBL Master].[Resolved] = Yes, [TBL Master].[Date Completed] = Now()
WHERE ((([TBL Master].[Primary key])=[forms]![frm name]![primary key]))
WITH OWNERACCESS OPTION;

The query allows me to update the record on that form efficiently. However, I do not want to create one query for each form (30 plus) for this.

Is there a way to use the form that was used when the button was clicked without naming the form specifically?

View 4 Replies View Related

Queries :: Parameter In Query By Two Separate Form Field

Oct 31, 2013

I want to set parameter in my select query with or function as in detail.i have two form with same field

1-with field A
2-With Field A

now i want to select data for a table .with a parameter select with Field A in form 1 or Field A in Form 2.How can i do it

View 5 Replies View Related

Queries :: Make A Query Use Another Field For Parameter Info

Apr 10, 2013

I have a query with a parameter query but what I need is the information to be passed onto another parameter query automatically.

I have a Field called ITEMID and ITEMIDFK

the criteria for ITEMID is [ENTER Item ID Number]

once entered I need ITEMIDFK to use the same information inserted into the first parameter is this possible?

View 3 Replies View Related

Queries :: Adding Test Field To Different Table And Try Different Query Using Like Parameter

Mar 20, 2013

I'm using Access 2003...I have a query that searches a parts table by description:

Like "*" & [Enter in Part Description to search] & "*"

I need to add another search to this query, I added another field to the parts table call manufacturer. I add this field to the above query and added this parameter to it:

Like [Enter in Manufacturer] & "*"

I then added a manufacturer to one of the fields for test purposes. For some odd reason this doesn't work. If I take out the manufacturer parameter and don't enter in anything into the part description the query returns all the records. When i type a description into the part description field the query returns the proper records. When I add back the manufacturer parameter and enter through both parameters only the one record returns showing the test record instead of all of them. If I put a part description in and enter through the manufacturer parameter no records show when they should.

I've tried adding a test field to a different table and tried a different query using the like parameter. The parameter works in a field already in the table but won't work with the new field I added. I've done compact and repair.

View 6 Replies View Related

Queries :: Form To Select Parameter - Causing New Field In Query Design

Jun 16, 2015

I have a query with multiple fields that is being run off of 3 parameters (linked for selection in a form). The problem is, I wanted to enable a select all feature, so I included a "Or ... Is Null" part in my criteria section, so that when nothing is selected, the query/report returns all records.

Okay so the problem is whenever I run the query with nothing selected for the parameter and then return to design view for the query, a new field has been created in the query design, titled with the expression I use to pull the parameter value from the form. This is frustrating because then that is causing errors in another report I run that pulls values from that query.

View 1 Replies View Related

Capturing Parameter From Parameter Query

Jul 12, 2005

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.

View 2 Replies View Related

Parameter Query Asking For Parameter More Than Once!

Nov 9, 2006

Hi,

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.

View 2 Replies View Related

Queries :: Parameter In Field Row

May 21, 2013

Is it possible to have a parameter in the field row of a query? That way, the user could select the field they want to query against without going into the design view of the query.

View 9 Replies View Related

Nz Function Parameter On A Text Field

Apr 12, 2007

I've been searching for several hours now and can't find the answer to this problem...
I'm using a form to capture criteria for a query. One of the fields is a text field and here is the parameter I'm using:
Nz([forms]![frmMain]![Company],[CNm])

I want to return all records if the text box named Company is null. I'm getting only the non-null records. How can I get it to display all the records in the field, CNm?
Thanks!

View 2 Replies View Related

Queries :: How To Show Whole Parameter Field On A Report

Apr 25, 2014

I have parameters set in a query. This query generates a report. I want to have the parameter field the user enters show in the report. Example: I have Region set up as a parameter. The criteria in the query is Like "*" & [Region] & "*" The problem I'm having is in the report it only returns what the user enters in the parameter prompt.

For Example: If I type south it only shows south rather than south east or south central (which is the whole field), etc. on the report. It shows in the table generated by the query but not on the report. If I leave the parameter prompt blank it brings back all the records like it should but again leaves the "region" field on the report blank.

View 4 Replies View Related

Forms :: Enter Parameter Value On Unbound Field

Nov 27, 2013

I'm using Access 2013.

My scenario is: I have a Form to add Job Logs. This form has a cascading combo box with Clients filtering Projects. However, the Clients Combo Box is unbound, Projects is bound to the ClientProjects ID. I had to do this instead of have a key for both Clients and Projects in my Job Logs table due to the fact that Clients and Projects have a many-to-many relationship.

For Adding Job Logs this is fine.

My Problem: I have separate forms for viewing and editing Job Logs, and naturally, because Clients has no binding, every time I run these forms Access brings up the 'Enter Parameter Value' Message Box. I have tried a VB script to assign the Client ID based on the ClientProject ID value stored in the Projects combobox, on Form Load, however it still asks me to enter the Parameter Value and just writes the code in the combobox. Here's the Script:

Private Sub Form_Load()
Me.SelectClient = "SELECT Client ID, Client Name " & _
"FROM Client Projects Query " & _
"WHERE ClientProjectID = " & Me.SelectProject.Value
End Sub

Also, the Projects Combobox is also empty.

View 11 Replies View Related

Forms :: Using Unbound Field On The Form To Be Parameter

Apr 3, 2013

I have set up a Parameter query which works, and use this on a form.

What I am having a problem with is using an unbound field on the form to be the parameter.

For example in the Empty feild/box on the form I would type SMITH, and this on a click of a button next to it would run the parameter query as a subform.

View 1 Replies View Related

Queries :: Parameter Drop Down To Save User Input In Full Domain Field Name?

Oct 14, 2013

I have created a query with the parameter for the Domain field. however on the form the user enters this information via a drop down menu. i was just wondering could the parameter box be set to a drop down box as well to save the user entering in the full Domain field name?

View 6 Replies View Related

Parameter Query

Jul 28, 2005

Hi All,

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?

Thanks!

View 1 Replies View Related

Parameter Query

Aug 31, 2005

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?

Thanks

View 2 Replies View Related

Parameter Query Help

Sep 2, 2005

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.

Thanks.

View 1 Replies View Related

Parameter Query

Oct 19, 2005

Dear All,

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

Many, Many thanks

View 1 Replies View Related

Parameter Query? Pls Help

Jan 18, 2006

I want my msgbox to tell my user that this projectId does not exist in our db if the sql search returns an empty value. I get errors that i can't run this action query. please see red text. any ideas?

Private Sub Project_Quick_Find_Click()
On Error GoTo Err_Project_Quick_Find_Click

Dim stDocName As String
Dim stLinkCriteria As String
Dim Ssql As String

Ssql = "Select [projectInformation].[projectId] from [projectInformation]" & _
"where [projectInformation].[projectId] = " & Me![ProjId]

'DoCmd.SetWarnings False
DoCmd.RunSQL Ssql
'DoCmd.SetWarnings True

stDocName = "Project Status - Full Details"
stLinkCriteria = "[projectId]=" & Me![ProjId]

If Ssql = "" Then
MsgBox "A Project with this number does not exist in our database", vbExclamation, "Cannot find project"
Else
DoCmd.OpenForm stDocName, , , stLinkCriteria
End If

Exit_Project_Quick_Find_Click:
Exit Sub

Err_Project_Quick_Find_Click:
If Err.Number = 3075 Then
MsgBox " Please enter a Project ID to find! ", vbExclamation, "Empty Field"
Else
MsgBox Err.Number & ": " & Err.Description, vbOKOnly, "Error"
Resume Exit_Project_Quick_Find_Click
End If
End Sub

View 1 Replies View Related

Parameter Query

Feb 6, 2006

Hi, I'm a complete novice to Access and wonder if anyone can help me with this one please? I have a column in a query that is the output from a barcode scanner called WhenScanned from a table tblScans. The data in the column is in the format of the date and time for example: 20/01/2006 21:30:00 I want to be able to interrogate the data in the query by selecting a range of a date(s) and times for example from 20/01/2006 05:30:00 to 20/01/2006 13:29:00, date and time range from 13:30:00 to 21:29:00, date and time range from 21:30:00 to next day 05:29:00. I can achieve this by typing the required range into the criteria row of the query column in design view e.g. >=#20/01/2006 13:30:00# And <=#20/01/2006 21:29:00# for each range but I want to make it more user friendly so that a user can select type in the appropriate date and select the time range from a drop down list or something without having to edit the query using syntax. Thanks in anticipation.

View 2 Replies View Related

Query - Parameter

Mar 16, 2006

hi all,
im trying to do this query, and in it i am using fields from 1 table, and i have created 2 fields using the expresion builder (these come up as Expr1, Expr2).
these field (expr 1&2). & iwant 2 do use a parameter on Expr1, but when i go to view the query, it says i need to enter a paremter value for Expr2.. if i click OK then the parameter i need appears and when i enter the value i want no records appear.
i uses the followin expressions:

Expr1: DateAdd("d",+[Expr2],[Date of Joining])

Expr2: IIf([Membership Type]="Family - 1 Year","365",(IIf([Membership Type]="Family - 6 Months","183",(IIf([Membership Type]="Adult - 1 Year","365",(IIf([Membership Type]="Adult - 6 Months","183",(IIf([Membership Type]="Child - 1 Year","365",(IIf([Membership Type]="Child - 6 Months","183",(IIf([Membership Type]="Student - 1 Year","365",(IIf([Membership Type]="Student - 6 Months","183")))))))))))))))

thnx in advance, chia

View 2 Replies View Related

Parameter Query

Mar 21, 2006

Hey guys

I was wondering how I would go about making it so that a query will run or not run based on the input from a combo box.

I have a form with several combo boxes. And a couple of these controls a query that I would like to be optional. Right now it runs no matter what the input in the combo box, but I would like it to run based on the selection of the box (ie. "Yes" or "No" type input)

Your help on this is much appreciated

Nathan

View 13 Replies View Related

Parameter Query

Jun 20, 2006

I am trying to create a query for a database for a company I'm interning for. The query is supposed to bring up an individual machine from a column labeled Machine ID. This column contains 20 or so abbreviated Machine labels. When you run the parameter query, and you select the individual machine ID I get multiple results or it brings up a list, but it is incomplete. The machines sometimes share parts, so in the machine ID column for a part there may be up to 5 machine IDs separated by commas. I want to know if there is a way of isolating a machine coded K from a part that has K,SIM12,C40 listed for the machines that it goes to.

View 1 Replies View Related

Parameter Query

Mar 13, 2007

I have a search button on my menu form that, when clicked, asks the user to enter a desired Reference number they wish to search for. This works fine when it is a Reference number that is stored within the database.

I have tested it to see if it works with reference numbers that do not exist, and instead of giving an error message to ask them to retry, it opens up the form to a new record... That is not what I want it to do.

Please can someone help me, here if my code up to yet (not sure if the msgbox is correct btw):

Private Sub cmdSearchSite_Click()
On Error GoTo Err_cmdSearchSite_Click

DoCmd.OpenQuery "qrySearchRTP"
DoCmd.OpenForm "FRM_PRIMARY"
DoCmd.GoToRecord acDataForm, "FRM_PRIMARY"
DoCmd.Close acQuery, "qrySearchRTP"
DoCmd.Close acForm, "FRM_MENU"

Exit_cmdSearchSite_Click:
Exit Sub

Err_cmdSearchSite_Click:
MsgBox ("Site not found. Please enter a valid RTP Reference Number")
Resume Exit_cmdSearchSite_Click

End Sub

View 14 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved