Use 1 Form And Choose From Which Query

Jun 2, 2005

Hi,
I have a requirement to filter some queries periodically on the date field.
What I want to do is create a form that lets you choose which query to use and filter and not create alot of single forms.
The filter will be only be applied whilst the form is open.

Cheers

Gordon

View Replies


ADVERTISEMENT

Parameter Query - Using Choose Function

Aug 24, 2005

I need to allow a user to select criteria as part of a query.

Running the query manually I would type in either:

"Core Stock"
OR
<>"Core Stock"

in the criteria field of the column.

I tried using the following parameter in the design grid:

Choose([Select 1: Core Stock 2: Not Core Stock : ],"Core Stock",<>"Core Stock")

The "Core Stock" option works but the <>"Core Stock" returns no records.

I would prefer not to use a form if possible . Any ideas ?
Regards

David

View 3 Replies View Related

Choose Table In Parameter Query

Oct 23, 2005

Hi

I would like to set up a query that uses two tables. One of the tables, the 'main table', wil be used every time the query is run. Each time a new record is created in the main table a 'new table' is created containing a subset of data - the name of this table uses a ref ID from the main table. I would like to be able to select which 'new table' to use in the query as part of a parameter query.

eg. Main table record 1 has a field JID of J0001 and a corresponding 'new table' titled J0001. record 2 in main table has JID J0002 and creates a 'new table' J0002 etc

so I would like to set the query up such that when a record is chosen in 'main table' the query knows the name of the 'new table' corresponds to the JID of the record in 'main table' ....

Have seen the same question asked but no answer - is this possible ?

any pointers appreciated..

View 4 Replies View Related

Update Query To Choose Criteria

Mar 2, 2007

Hello, i was wondering if you could help.
I want to run an update query, taht updates prices in a table. But i would like to be able to choose the criteria when the query runs, for example a message box appears, that will allow me to enter a certain amount for the prices to change by. Could someone guide me on how to do this? thankyou, its much appreciated

View 3 Replies View Related

How Can I Have A Listbox Let Users Choose What Query To Run?

Jan 6, 2008

I want to have users be able to choose query "x" "y" or "z" from a listbox. Upon selection of query "x" "y" or "z" from the listbox, I want the query to run? I want to run this query from form "RunQueries" Does anyone know how I can do this? Thank you in advance for any suggestions, I appreciate all the help I can get

View 10 Replies View Related

Queries :: Using Choose Function In Query

Sep 28, 2013

I have an option group that lists a variety of categories which I want to query on.

I know that the option group only returns values.

In the Option Group, On Time = 1, Over Due =2 ,,,,

I am using a Choose function in my query. That is working fine. But ... I would like to have a last choice called "All" such that when selected all data is shown (i.e., On Time, Over Due, ....).

I am using the following:

Choose ([optiongrpStatus],"On Time", "Over Due", .... ,???) as my query criteria.

Have not figured what I can put in the last choice to get all data.

Tried "Is Not Null", tried "On Time or Over Due" - know these don't make sense -just wanted to try.

View 7 Replies View Related

How To Choose The 10 Latests Entries In A Table (from A Form)

Aug 10, 2007

I'll start by saying that I'm not sure which sub-forum to choose, as my question(s) covers several areas, so I have tried with this one first.

I'm currently making a database, which among other things contains a 'Port of Call list' table. I have a form, where I can add data to this table, meaning, that whenever a vessel has left its port, user can update following: Port name, security level, arrival date and departure date.

What I need is two things (it might be more or less the same):

1. When user click a "Generate" button on a form, the 10 latest port calls from the table, should be shown. I'm not sure what kind of control is the best to should the list on the form. Code is also needed.

2. I would also need to be able to print the list. It should be part of a report. Again which controls/which code to be used is needed.

I hope that someone are able to assist, as I have no clue what to do.

Thanks.

View 10 Replies View Related

Choose Account On Force Email From Form

Jan 4, 2008

I have a form that has a bunch of check boxes on it.
The user selects specific check boxes
My code then has a few If then statements to test which ones were selected.
With each one that is selected a query is run to select specific records in a table. (querying out the values from an email field)
The user then hits a button to send the email.
Microsoft Outlook opens and the emails list is added to the "To" in the email.

Everything works great...But I have a slight issue. If a user has permissions on more than one account when they go to send an email they have the ability to choose a "From" (thus specifying which account to send from)

The user can currently select which one they want but I want this to be more automatic.

CAN i specify which account to send from automatically when the email opens. BUT Just for this application...

Does that Make any sense?

THanks in Advance




Code:Private Sub Command23_Click()' This section is Calling seperate Subs that verify if a Radio Button is selected' If selected it builds the string needed for the email.Call TestCheck3Call TestCheck5Call TestCheck7Call TestCheck9Call TestCheck11Call TestCheck13Call TestCheck15Call TestCheck17Call TestCheck19Call TestCheck21Call TestCheck24Call TestCheck26Call TestCheck39Call TestCheck41Call TestCheck43' This part concatenates the email string being build andDim FinalEmailString As StringFinalEmailString = ""FinalEmailString = Test03 + Test05 + Test07 + Test09 + Test11 + Test13 + Test15 + Test17 + Test19 + Test21 + Test24 + Test26 + Test39 + Test41 + Test43' THIS SECTION TESTS THE CONCANTENATED STRING TO SEE IF IT IS NULL' IT THEN GIVE THE USER THE CHOICE TO CONTINUE WITHOUT ADDING EMAIL' ADDRESSES OR TO STOP AND MAKE A SELECTION.If FinalEmailString = "" Then Answer = MsgBox("You must first select a Group to email, if you wish to continue without adding an email list just hit No", vbQuestion + vbYesNo, "???") If Answer = vbYes Then Exit Sub Else ' This part sends the string to the email and opens the email DoCmd.SendObject acSendNoObject, , , , , FinalEmailString, "Alert Group", , True End IfElse ' This part sends the string to the email and opens the email DoCmd.SendObject acSendNoObject, , , , , FinalEmailString, "Alert Group", , TrueEnd IfEnd Sub' EXAMPLE OF ONE OF THE QUERIES BASED ON THE CHECK BOXESPublic Sub TestCheck3()Test03 = ""If Check3 = True Then Dim dbs As Database Dim rs As DAO.Recordset Set dbs = CurrentDb Set rs = dbs.OpenRecordset("Select * From tbl_Business_Name WHERE TYPE = 'APARTMENTS'", dbOpenDynaset) Dim strTO3 As String strTO3 = "" Do Until rs.EOF strTO3 = rs!EMAIL & ";" rs.MoveNext Test03 = Test03 + strTO3 Loop rs.Close 'Close what you opened. Set rs = Nothing Set dbs = NothingEnd IfEnd Sub

View 1 Replies View Related

Forms :: Choose Next In Sequence Via Form Entry

Mar 20, 2013

Any way to automatically choose next in sequence via form entry in Access 2007.We currently have an excel spreadsheet tracking who attends review meetings for new products. There are 12 people who are eligible to attend the meeting, and the next person in the sequence should be chosen when a new meeting is scheduled. I'll be adding this to an existing database with an "associate" table- where each associate name is assigned a numeric value, if this can even be done.

The problem is that the logical order may not always be followed. Associate 8 might be up next but be on vacation, so Associate 9 is sent in their place. We can't skip over Assoc. 8 completely so we'll go back to them once they're back in the office, but we don't want 9 being sent to the next one after that again. Or the manager might determine one associate has more knowledge in the area of the new product being presented and send them out of order. In Excel it's easy to see who is up or who has been skipped, but in single-form data entry in Access the pattern won't be visible.

View 4 Replies View Related

General :: Choose Backend Location From A Form

Dec 18, 2014

I'm making updates for the front end then i send it to 10 pc's in the office then i should change the backend location via linked table manager for every pc

So is there any way to let the user choose the backend location when he open the database nad then it will automatically update the tables link

View 4 Replies View Related

Can I Dynamically Choose Which Fields Are Being Selected In A Query?

Jun 6, 2007

Is it possible to have a form designate which FIELDS to include in a selection query? I know that I can determine criteria and such, but i want the user to be able to generate a report based on the query select a, b, c from blah, or if they wish, just select a, b from blah...

View 5 Replies View Related

Multiple Combo Boxes In Form To Choose Groups Of Records

Feb 16, 2005

Hello,
I am wondering if it is possible to have several combo "boxes" in one form. The form is based on one table. In the table there are several fields which use a look-up (combo) drop down box to choose from: Type, Description, Manufacturer and Location.

In the form I want a combo box for Type, to bring up specific records in a subform, then I want a combo box for Description to bring up another set of records (within that Type of equipment) and a third combo box for Location to bring up all equipment within that location.

When I have tried to set this up - it changes some of the data in the in the subform - which changes it in the underlying table. If it set the form to open in New Record, then nothing shows up in the drop down box. Is there some If, THen code I could use to make it look first in the Type, then in the Description field, then close those out and look for the set of records that match in the location field?

Does that make sense?

I know how to manipulate in MSAccess templates, etc., but I don't know much about the underlying codes.

Thanks for any help!!!

View 1 Replies View Related

How To Create A Form With A Listbox That Lets U Choose Reports And Preview Or Print

Sep 15, 2004

Hello,

Does anyone know how to create a form with a listbox that lets u choose reports and preview or print at the click of a button. I know you can do it wil tables and queries but I need it to do it for reports.

Thanks

View 11 Replies View Related

Forms :: Include Check Boxes In Interactive Access Form Allowing To Choose Output Field

Jun 27, 2013

Including check boxes (representing the query fields) in an interactive access form, in order to decide which fields should be visible.

I think the solution is building an invent in VBA for each check box, however I'm not an expert in Access VBA and don't know how to write the code.

In the example that I've uploaded, in the Form1, when I run the query, all fields are displayed, i.e. VENDOR, REGION, CUSTOMER and MATERIAL are displayed. How can I manage it in the form with a listbox to display only the REGION or MATERIAL for instance.

View 4 Replies View Related

Is It Possible To Choose No Criteria On A User-defined Criteria Form?

Sep 15, 2005

I created a form that allows the user to choose the criteria that they want to see on a report using =Forms!formname!controlname in my query. It works great but I want to also allow the user to choose nothing and return all records instead of limiting them to choose just one type of record. Is this possible? Before I created the form my query had the [Enter parameter] on one criteria line and [Enter parameter] Is Null on the next criteria line and that was working great for my use but I need to create a simple form for other users.

View 1 Replies View Related

Choose Higher Value

Aug 8, 2005

Hi,

Is there a way to automatically choose a value such as 0 if the expression goes to a negative number?

E.g. I have a query that will subtract a numeric field from 10. If 10 - [numericfield] is less than 0, then I only want it to display 0. Otherwise, it can display the value if it is positive.

Any help would be much appreciated.

View 3 Replies View Related

Choose Order By

Feb 19, 2008

Hi everyone,

I am looking for some help with a particular problem. I have a report based on a query and at the moment it is ordered by a particular column.

What I want to be able to happen is that the user chooses what they want the query (and subsequently) the report to be ordered by before they run the report by means of a combo box or something like that.

Is this possible in anyway?

Thanks.
Gareth.

View 3 Replies View Related

Using IIF Criteria To Choose Between Two Different Like Selects

Aug 26, 2014

I am setting up an Access database for a small school. The database contains a record per person. When we get a duplicate lastname field we set a family_id field to lastname followed by a number.

So for example the first Smith family needs to family_id. But the second Smith family gets a family_id of smith1. To select an ordered list of Families I need a query that will use the family_id if it is set and if not use the the lastname to collect family members.

My query uses a presorted table, CurStuByGrdTbl , of current students to produce the families directory by grade and alphabetized.

The WellSchoolCommunityAll table is the entire database. So if the student entry has a valid family_id, matching pattern "*#" then

I perform a Like with family.id otherwise I perform a Like with lastname.

This query gets me nothing, no records.

IIf(([CurStuByGrdTbl].[family_id]="*#"),[CurStuByGrdTbl].[family_id] Like [WellSchoolCommunityAll].[family_id],[CurStuByGrdTbl].[lastname] Like [WellSchoolCommunityAll].[lastname])

View 4 Replies View Related

How To Choose Field Based On Criteria

Jun 1, 2007

Hi,

I am building a database that calculates freight costs for shipments.

I have one table that has order data with fields such as [Order Number], [Origin], [Destination], [Service Level], [Weight].

The service level is one of 4 values: PRE 9, PRE 12, NEXT DAY, NEXT DAY +1.

The origin and destination use country codes such as BE, AT, CZ, PL for Belgium, Austria, Czech, and Poland respectively.

I also have rate sheets from carriers such as DHL and UPS and they provide their rates in the following format (numbers are made-up as real rates are confidential): [Origin], [Destination], [Service Level], [0 to 0.5 kg], [0.5 to 1.0kg], [1.0 to 1.5kg], [1.5 to 2.0kg], etc all the way up to 30kg. The rate is then in the appropriate column and the row gives the origin-destination-service level combination.

(sample freight rate table uploaded as zipped excel sheet in attachment)

I need to return the rate from the appropriate row based on the [Origin], [Destination] and [Service Level] fields (easy enough), which is easy enough.

The hard part is selecting the correct field to return. I tried usign a Choose expression but Access rejected it saying it was too complex (maybe because too many choices?).

So I'm stuck. And working towards a deadline... :-)

Can anyone help please?

Many thanks,
Martin.

View 1 Replies View Related

Choose From Combo-box, Or Manual Entry. Help!

Apr 6, 2005

Can't seem to figure this out.

I built a db for tracking and entering sales info but I'm having a problem with one of my combo boxes. To make entering data easier, I created a combo box that you can select a sales persons name from, then based on who is selected, their Title and Office location also populated.

The problem I have is when I want to manually type in the Name and other info for a temporary sales person. How can I allow users to choose from the drop down or just type it in if that person is not in the list?

Thanks in advance for your assistance.

View 1 Replies View Related

Choose In Combo Display In Field

Sep 1, 2006

Hi

Can anyone create a form with a combobox where you can select a form and this form will display in an static area.
Then you can choose another form in the combobox and it will display in the same spot.
the forms that will be displayed are exactly the same size.

This would help me very much

Thanks

Mikael

View 1 Replies View Related

ListBox To Choose Monthly Reports

Sep 3, 2004

Hi,

I'm trying to create a pop up form that asks userto select months for a report to preview. I've writtent he query and done the report. I can do the command button to get the selectmonth form to pop up, but not sure how I pass the selected months into query for the reports. Any tutorials on this or can someone help. I've been looking around but nothing quite fits. Quite new VB also, but have a good understanding programming generally.

Thanks.

View 1 Replies View Related

Queries :: Choose Function With Parameters

Dec 27, 2013

UMMonth1: Choose([Enter Qtr],[OperationsAuditData]![1],[OperationsAuditData]![4],[OperationsAuditData]![7],[OperationsAuditData]![10]).But I keep getting an error message "You tried to execute a query that does not include

"UMMonth1: Choose([Enter Qtr],[OperationsAuditData]![1],

[OperationsAuditData]![4],[OperationsAuditData]![7],[OperationsAuditData]![10])' as part of an aggregate function."

View 2 Replies View Related

Reports :: Choose What Data To Be On Report

Aug 11, 2013

I have Access 2013 but am new to Access and am learning as I go along!I am making a database of song lyrics so have made a table of the title of the songs with the lyrics for each verse as different fields. I want to be able to choose multiple songs by their title to then show the full lyrics on a report.

View 5 Replies View Related

Button To Choose Data Type

Feb 5, 2012

I am new to access. What I want to do is to set up a button in where the value that I typed in a text box besides it, be transferred to the corresponding cell type.

Let's say I typed 100, and then I click Income or Expense, If I press Income it will be sent over to the cell containing the incomes and etc. A check box works too.

Next thing that I want is to create a sub category.

If I have a large categories list like in the personal account ledger template, I want to be able to select a main category and if it has a sub category, give me a drop down box to select the corresponding one.

I enter my value, choose whether its income or expense, date and etc, then if I choose the "Home" category, I want it to allow me to also select whether its "Phone", "Water" and so on.

View 3 Replies View Related

Choose Match Index In Access

Mar 19, 2012

I have a quite complicated formula that I run in excel and I am wondering whether there is an alternative to do this in access:

=CHOOSE(MATCH(B1,INDEX(LARGE(INDEX($B$1:$B$65536*( $A$1:$A$65536=A1),0),COUNTIF(A:A,A1)-(ROW(INDIRECT("1:" & COUNTA(A:A)))-1)),0),0),"1st","2nd","3rd","4th") & " best"

Which gives me the below

name/ score/ peronal best) -> logic if participant has only one score - this remains his/her first best; if more than 1 scores - then the lowest gets 1st best, second lowest - 2nd best, etc....

See below the output:

Anna
2
1st best

Luisa
4
2nd best

Luisa
3
1st best

Angel
1
1st best

Angel
8
4th best

Angel
7
3rd best

Angel
5
2nd best

Arlene
1
1st best

Arlene
9
2nd best

View 1 Replies View Related







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