need help with query ...

Hi,

I am looking to write a query with multiple factors and do not know
the best way to do it.

I want use Event Type, Status, and Region as my queries variables.  By
default I want show "all", but then be able to use drop downs to
filter with.

Can anyone please give me an idea on the best way to do this?  If this
does not seem to make sense, please let me know.

Kind Regards,
Ray
0
bcap
12/14/2007 5:57:14 PM
access 16762 articles. 3 followers. Follow

3 Replies
421 Views

Similar Articles

[PageSpeed] 37

To be able to have combo boxes for query parameters, you must create a form 
with an unbound combo box for each parameter.

See http://www.mvps.org/access/forms/frm0043.htm at "The Access Web" for how 
to add the keyword "All" to each combo box.

In your query, set your parameters to

Forms![NameOfForm]![NameOfCombo] Or (Forms![NameOfForm]![NameOfCombo] = 
"All")

Put a command button on your form to invoke the query.

-- 
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no private e-mails, please)


"bcap" <rayh@patriots.com> wrote in message 
news:e37f3d09-e71c-497e-9f60-6e8c978dd6f0@d21g2000prf.googlegroups.com...
> Hi,
>
> I am looking to write a query with multiple factors and do not know
> the best way to do it.
>
> I want use Event Type, Status, and Region as my queries variables.  By
> default I want show "all", but then be able to use drop downs to
> filter with.
>
> Can anyone please give me an idea on the best way to do this?  If this
> does not seem to make sense, please let me know.
>
> Kind Regards,
> Ray 


0
Douglas
12/14/2007 6:03:42 PM

Hi,

I am actually using an Access DB with an ASPClassic front-end, would
this stay the same?

Thank you very much! =)
0
bcap
12/14/2007 6:08:58 PM
Hi,

I just tried out this sample.  I think I need to explain my idea
better.

I have a field of event types, regions, and status.

By default, I would everything to show.

What I would like to do is give the users the ability to be able to
query for a specific event in a specific region.  Or maybe simply all
event types and all regions with a pending status.

Basically, I want to create a query depending on the different
combinations of these variables.

Is this possible?  My biggest concern is, what happens if one of these
fields is null?

Thank you,
Ray
0
bcap
12/14/2007 6:17:23 PM
Reply:

Similar Artilces:

please help!!! Unable to delete emails
NAVCE deleted the edb.log file from my \exchsrvr directory. We were able to do a hard restore to get it back up but we have several emails in users inboxes that cannot be opened. When you double-click the email you get a 'can't open this item' error. It appears something did not synch properly during the restore but my email is now up and running. I personally have a couple dozen emails in my inbox from 9am - 2pm yesterday that I cannot open and get that message. How can I permanently delete those emails??? Getting them back would be nice but I don't want to ri...

Sending the variable to a query as a criteria
Hello, I can send a value as a criteria to a specific query if it is a text of a textbox, combobax, label etc. But, i wonder if i can send a variable to a guery... I mean, such as... dim a as integer a= me.texbox3.value requery xxx... And in xxx, there should be column, for ex. xyz that has the criteria a.. But it does not work :( How can i do it? thanks... SupperDuck wrote: > Hello, > > I can send a value as a criteria to a specific query if it is a text > of a textbox, combobax, label etc. > > But, i wonder if i can send a variable to a guery... Create a us...

Building a Query by Form Interface
Hello, I'm trying to create a method where a user selects some criteria in a form and a query then generates the results. I have been able to pass numbers successfully in the query but not text. If anyone has an easy way of developing this let me know. The code below works for numbers but not text Help me please. Function BuildSQLString(strSQL As String) As Boolean Dim strSELECT As String Dim strFROM As String Dim strWHERE As String strSELECT = "s.*" strFROM = "UFRRecords s " If Check2 Then strWHERE = strWHERE & " s.[FlagField1] = " & Combo0 End I...

Macro to help update data from protected files
I need help in creating a macro. I have a master file X1 and it connects to 55 other files all password protected. When i open the Master file , it asks the protected fiel to be open to update the data, otherwise it gives error. Can someone help me create a macro which will update the data witout opening the protected fiels one by one. Thanks I don't think you'll find a macro that can do this. But what you could do is create a new workbook that opens each of those 55 other files (supplying the password) and then opens your real workbook. hamad.fatima@gmail.com wrote: > > I ...

NEED TO FIND FIRST " " FROM RIGHT
Help - I have a column in excel that contains names, such as: Joe Smith Joe E. Smith Joe Edward Smith, esq. etc I need to isolate the LAST WORD in the column, for example: Smith Smith esq. The only way I know how to do this is to search for the first " " - but I need to start the search from the RIGHT, not the LEFT. As far as I know, FIND function starts the search from the right... which isn't what I want. Can someone please tell me how to accomplish this task. THANK YOU =RIGHT(A1,LEN(A1)-FIND("^^",SUBSTITUTE(A1," ","^^",LEN(A1) -...

Grouping query titles or color coding them
Is there a way to group queries together like in folders? Or is there a way to change the font color of the query titles. WHEn you have so many queries to look through it takes so much time finding just the right one. I know that choosing the right title name helps but still if we could group them in some way or color code them. Even if we could put a line after so many queries or something. I see the Groups option in my data window. But how do you use them. I will look into the training center if they have anything on this. But thanks a lot for the lightbulb idea. "scuba...

Need info on scheduled meetings: time scheduled/who scheduled it
We have a situation where many people have access to the managers calendar and can scheule meetings. It would be very helpful to be able to identify not only who scheduled the original meeting (and the date/time) but also who modified meeting parameters after it was orignally scheuled. The current 'properties' tab only tells you the last time the file was modified, which is typically not very helpful. thanks "Joe Bruin" <Joe Bruin@discussions.microsoft.com> wrote in message news:126EFECB-58AF-4253-A53F-C629E4A354F7@microsoft.com... > We have a s...

Help #30
Hi, I have a row of data that I need to find a minimum value and a maximum value. That's done. Now, I have to delete both the minimum and maximum values from the row. Can you tell me how to easily do this? I have a larg :confused: e worksheet with many rows, so Edit+Find really won't help. -- only1joal ------------------------------------------------------------------------ only1joal's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=24589 View this thread: http://www.excelforum.com/showthread.php?threadid=381823 Assume data is in Sheet1, in row1 down ...

Help with Exchange 5.5 Queue problem
Okay, first off, I inherited this Exchange server. It has been over 5 years since I last touched one of these. Client noticed that no e-mails were being sent out. I checked the IMC queues and they were packed full of email going to .tw, .fr, .de, etc. Disconnected the ethernet cable from the back of the box. Ran the much needed virus check and got rid of 225 Netsky and Beagle viruses. Reran a few times just to be on the safe side - server is clean (latest norton updates). And made sure that relaying was also turned off - just for fun. Cleaned out the queues (deleted the contents of the ...

Publisher and PDF help...
I am trying to find a solution to my delima. I have publisher on one computer and adobe acrobat on another. Is there a Publisher viewer or some work around that anybody knows of. Thanks in advance... While in a state of ecstasy after repairing his laptop, Ed sees a message from Neal <Neal@discussions.microsoft.com>. On it is written: > I am trying to find a solution to my delima. I have publisher on one > computer and adobe acrobat on another. Is there a Publisher viewer or > some work around that anybody knows of. Options: a) Output a PostScript file from Publisher and di...

How to export tasks ? pls help
Hi, How do i export and import tasks using MS outlook? I did export of my mailbox and when i import it the task does not come? Are tasks included when you run Import/Export Wizard using MS Outlook? thanks In news:B09D3EAF-C4C7-4D45-BAC5-D1DC39DE4794@microsoft.com, Jack Dorson <JackDorson@discussions.microsoft.com> typed: > Hi, > > How do i export and import tasks using MS outlook? > > I did export of my mailbox and when i import it the task does not > come? > > Are tasks included when you run Import/Export Wizard using MS Outlook? > > thanks Hi - this ...

formula help #14
I have a plethora of spreadsheets that I would like to alter by adding specific text to all cells immediately to the right of a cell with specific text. Example: For all cells that read University of Maine I would like to add a cell to its right that has the text "Black Bears Main Gym". How do I get excel to do this for me without me going through, finding all desired cells and adding the new info myself? Please help ASAP. Much appreciated! Edit/Replace HTH, Greg "CJer" <anonymous@discussions.microsoft.com> wrote in message news:199d201c41cd1$9cf91a50$...

Need Help Converting over to Outlook From Express
OK, I have been using OE for about 2-3 years now for my Email and Newsgroup reader. This past Christmas, I got a Pocket PC that came with Outlook 2002. I plan to use t to be able to keep track of my appointments and such but I would also like to use it as my new email reader. I also would like to use it for newsgroups, if that's possible. Is there a way that I can transfer all my settings, emails and newsgroup information over to Outlook or am I forced to just start from scratch? Thanks JTMcD OL has no Newsreader capability. In OL News is accessed via the OE newsreader as it is from...

Need a Formula based on multiple cirteria
I am building a spreadsheet that will continue to grow in size. Th basic outline of the spreadsheet is as follows: A // B // C // D // E // F // G // H // I // J // K // Sys Name // Project // Type of Bldg // Type of Work // Type of Price / W/L // LNFT // CST // HRS // $/LNFT // HRs/LNFT // Consept of the sheet is: Column A will be grouped (using the Group command) Column B is input for reference only, no lookup functions need apply Column C is a Drop Down menu consisting of approximately 10 differen types of Bldg. Column D is a Drop Down menu consisting of approximately 5 differen types ...

Please help #13
Hi, I have a talbe including two or more same name, I want to make it from: tom 10 Mike 10 tom 20 jerry 30 to: tom 30 Mike 10 jerry 30 Please help, Thank you! Sub TidyData() Dim iLastRow As Long Dim i As Long Dim j As Long Dim iRow Dim sFormula As String iLastRow = Cells(Rows.Count, "A").End(xlUp).Row j = 0 For i = 1 To iLastRow On Error Resume Next iRow = Application.Match(Cells(i, "A").Value, Columns(3), 0) If IsError(iRow) Then j = j + 1 Cells(j, "C").Value = Cells(i, "A").Value ...

need similar solution to "cascading combos"...
I'm creating a search form w/ unbound combo boxes that create a filter on the subform. Can I use the filtered view of the subform as the starting point for my query? Like clone that recordset and reference it in code from the combo boxes? I'm a newbie in Access so don't know VB well enough mess around with recordsets in code yet. Dave I created a search form that is similar to what your are trying to do (I think). I also based mine on the Allen Browne example but instead of text boxes, I used several unbound combo boxes for Customer Name, Product Name, Location, etc. E...

Query/Report based on Employee Hire Date
This is probably a very basic thing that I just don't know how to do. I need to pull a report on people hired in December, regardless of year, for performance appraisals. The hire date that I currently have in the database is in the mm/dd/yyyy format. How do I sort on just the Month portion of this. I can then build my reports off of the query. Thank you in advance for any help or suggestions. Steve Add a calculated field to the query. Field: Month([Hire Date]) Criteria: 12 That gets everyone ever hired in the month of December. John Spencer Access MVP 2002-2005,...

Similar function needed to Excel VLOOKUP
Hi everyone, I hope someone may be able to help. I have a database with three tables. The main table is a portfolio of projects with budget, date and other general information. There are a couple of columns I need to update automatically by looking up information on the other two tables which hold budget and date information. The other two tables are linked to external excel sheets which allows the tables to auto update when excel is updated. How do I get the budget and date columns in the main table to lookup data from the other two tables and return the up to date figures ...

help with formula and lists
Hello first of I will explain what i need. i work for a printing company and we need something that will calculate direct costs and overheads i have created a workbook that contains the following: sheet1 contains a list of 26 stocked papers, cost per/000 and cost per sheet. sheet 2 contains labour costs for: binding, laminating, and printing. for each their is cost per hour, surplus materials, and cost per unit. Also for each of the processes their are 2-3 variations. for example for laminating it can be: gloss, matt or un-laminated. Each costing a different amount. Now this is where I...

Need Help for Desirability Calculator (moving squares with numbers around)
Hi, I'm new to this forum and don't know much about excel. I want to make desirability calculator wich is related to a game. In the game ther are structures and each structure has a desirability affect on it environment. When a few structures are placed next to each other it' too tedious work to calculate their total affect. I hope the attachment will be clear enough to show what I want to do. There are around 30 structures but as an example I have shown th desirability affect of two of them; an oracle and a garden. When yo open the file you will see these two structures and thei...

HTML TEMPLATES
I really need some help - I know how to create an HTML template to use with outlook - but I don't to use it all the time, only when sending out emails, is there a way to select to use the html template when i want to send certain emails? I can't find this info anywhere. Of course, Outlook Exp makes this really easy, you just select a template from a drop down list when creating a new message - surely there's some way to do the same thing in outlook?? "Tal" <goer2u4@hotmail.com> wrote in message news:44c6625c@news.comindico.com.au... >I really need some ...

Script help...
Hi, I need to run a script that will show me all of the forwarding addresses I have setup in my environment. For example, the script would say something like, for all users in the domain that have forwarding setup, output that list to a text file. Traditionally I use dsquery and dsget which works well but neither tools seems to support the field that is used for forwarding (on Exchange General tab, Delivery Options, Forward To)... Is there anyway for me to get a list like that? Thanks, Dan Here's a script. http://www.exchangepedia.com/blog/2005/10/list-users-with-email-forwarde...

Help File Will Not Launch
Clicking on the online user guide link for Money 2004 found at http://www.microsoft.com/money/support/manual/ produces no results. It behaves like a dead link, but I'm sure thousands of people would have notified Microsoft if it were. Any idea what settings I should check on my machine? -or- Can the user guide be downloaded to a user's machine and then opened? In microsoft.public.money, Ross wrote: >Clicking on the online user guide link for Money 2004 >found at > >http://www.microsoft.com/money/support/manual/ > >produces no results. It behaves lik...

Importing Text file....need to manipulate text and spread across multiple columns.
I receive a number of different data files in varying formats. In orde to effectively review the information, however, I need to format it an sort it in a way that makes the data useful. Here is an example o what I have (this infromation has been scrubbed) : <Seam> First Name Neelakan Ready <Seam> Last Name Chin <Seam> Address 31 Bloomfield Lane,Apt #215 <Seam> City Auburn <Seam> State Michigan <Seam> Post Code 48336 <Seam> Country USA Here is what I want: USERID First Name Last Name Address City <Seam>...

Need formula
Hi everyone there, I am looking for someone to help me to set up formula . I am a newbe to excel and I am having a hard time with my spreadsheet. My spreadsheet looks like this: column a is date, column b is: IN, next column is: OUT,and next after that is: ON, PORR , GLR, GLI, TPC, those are training materials. I need to set up formula for it. I bring training materials in and send them out to training facilities I have been dooing it manualy so far but I would like the excel do it for me. I need to keep records how many training materials are coming in and how many are going out and how ...