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 Replies


ADVERTISEMENT

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

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 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

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 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

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

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

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

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

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

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

Popup Calendar, How To Choose The Day Aswell As The Date

Nov 30, 2006

hi.. i have attached a simple db.. 1 table.. 2 fields..

jobdate and jobday

open the form and double click on the jobdate.. it opens a calendar.. when you choose a date it puts it into the jobdate field..

i have created a simple drop down underneath the jobdate with the days of the week..

is there a way to tweak the calendar module so it also chooses the job day.. because the days are clearly displayed along with the number dates.. so it must be possible..

here is the db in 2000 and 97 format..

thanks in advance.. i think this will benefit many users using this calendar

View 6 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

Value From Listbox Is Wrong When I Want To Choose A Record In A Subform. Need Help

Feb 14, 2008

I'm new to MS Access but I'm trying to do subcontractors database for my company. I've got a menu form with to listboxes on it. First listbox is a subcontractor name if I choose the name the second list box will show me the names of the emplyess attached to this subcontractor. Second form is subcontractor details with emplyees subform. If I will dblclick subcontractor listbox it takes me to record with subcontractor but I can't figuret out how to do that if I dblclick the employee listbox it will take me to appropriet subcontractor detail and to wright employee details. PLEASE HELP ME. I'm strugling with this. Thanks

I've made it to set focus to subform, but if I will choose a subcontractor from the first listbox and dblclick on lstEmployee it is choose wrong record of the employee. Have somebody have an idea what I'm doing wrong

I don't know how to attach the file,can sombody tell me how.

Code of this listbox:

Private Sub lstEmployee_DblClick(Cancel As Integer)
DoCmd.OpenForm "Subcontractors", acNormal, "", "", , acNormal
DoCmd.GoToRecord , , acGoTo, Forms!Menu!lstSubcontractor
Forms!Subcontractors!tblEmployeesubform.SetFocus
Forms!Subcontractors!tblEmployeesubform.Form.Emplo yeeID.SetFocus
DoCmd.GoToRecord , , acGoTo, Forms!Menu.Form!lstEmployee
End Sub

I think last line makes me those troubles but I don't have an idea what is wrong.

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

Forms :: Choose Which Subform To Display From Combo Box?

Jun 16, 2014

I have a blank form with a subform. All I want to do is have a combo box with the names of the subforms in, and when you choose one it is displayed in the subform box.

Names of the subforms are:-

qselDuplicateCustomersByHomePhoneNumber
qselDuplicateCustomersByMobileNumber
qselDuplicateCustomersBySurname&Street
qselDuplicateCustomersBySurnameHouseNo&PartStreet
qselDuplicateCustomersBySurnameHouseNo&Street

I'd like to display them more readable in the combo box, i.e. 'Duplicate Customers by Mobile Number'.I'd also prefer that the subform box is blank when the form is opened.

View 7 Replies View Related

Forms :: Choose Varying Number Of Subforms

Jun 23, 2015

I am designing a data-entry system in Access 2003 for a clinical case-reading study. The questions that the case readers have to answer are divided into modules, and different batches of records use different modules, but all batches use a core module which includes identifying information and a set of questions that apply to all cases. The modules can include anywhere from about 15 to 60 questions. Some of the modules have been written, but the idea is to create new modules as the need arises. The data will be exported to an Excel spreadsheet for analysis. There is no need to plan for reports and this isn't really a relational database.

The problem is to allow the reader to enter data for the relevant modules, sometimes one, sometimes four or five or more.

I have created a main table for the core module and a form to go with it. I’m assuming I need to create a separate table, related to the main table, for each module and an accompanying subform for each table.

How do I create a menu system that will allow the case reader to choose only the subforms needed for a particular record?

View 4 Replies View Related

General :: Choose Function Through Expression Builder

Jul 13, 2012

I want an example of choose function to write in expression builder in access 2007 ..

I have a size as 1/4,2/3,4/9 etc to be converted to ABC,DEF,GHI etc . i have nearly 40 entries so i think choose statement would do it .. moreover i cant find switch statement in expression builder .......

For example one could be to replace the text ..... or any other method to change the size to alphabetical grade.

View 4 Replies View Related







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