Defining Query Filters From A Form

Nov 28, 2005

I have a database about when computers have been installed

I have a form
It has a drop down list with Januray through to December

I want the user to select a month and a year and then click the command button and it will run a query displaying all the computers installed in the month of that year

any ideas people?

View Replies


ADVERTISEMENT

Reports :: Create A Graph (report) Based On A Query With Form Filters

Apr 25, 2014

I am trying to generate a report that is based off of a query. The query has a form filter that it needs to filter the data. I keep getting a jet engine error and couple others.

The form has year, start week, and end week on it. I can get the query to work fine. When I try to open the report, Access says it doesn't recognize the " [Forms]![frmUptimeFilter]![StartWeek] " as a valid field name or expression.

View 2 Replies View Related

Defining Criteria In Form

Aug 4, 2005

Hi all - I have a suite of reports which provide customer details. They all require the user to input the name of the customer.

The way it works is that I have a query which returns everything for the customer.

Then I have other queries based on the first query which bring back the specific information I want regarding the customer.

This works fine when the customer's name is entered using [Enter Customer Name] in the criteria of the relavant field in the first query.

However, because a user might want to run several different reports on the same customer it becomes a chore for them ot repeatedly have to enter the customer name.

My solution is to have an unbound field in the reports menu for the customer name and to use this as the criteria in the query, so it now reads [Forms]![FrmMenu]![Text42].

The first query runs fine, but the queries based on it are suddenly not returning any records.

There is undoubtedly a simple explanation for this but as I'm quite dim, I can't see it. Could somebody enlighten me and maybe even suggest a solution?

View 4 Replies View Related

Make Query - Defining Fields

Mar 30, 2007

When I run this query, the fields in the new table contains 253 characters. How do I specify in the SQL command that the field Carg2 and Carg3 will contain 3 charachters ?

SELECT dbo_allesc.AccReport, Left([AccReport],2) AS Carg2, Left([AccReport],3) AS Carg3,.........................
INTO regTabell

Thank you, Tor

View 2 Replies View Related

Forms :: Defining Colors On Form Control

Mar 30, 2014

I have to create a control on a form that will be able to change to one of ten colors, some of them are subtle shades. I will be doing this from vba on the control. I know how to do all of this except defining the colors.

I keep seeing the 3 part RGB(xx, xx, xx) etc. but I can't find the values for it that will give me the exact colors that I need!

I also saw a possibility of using a the hex equivalent for the color but I couldn't make that work?

View 2 Replies View Related

Query Which Filters Text Typed In Text Box On A Form

Dec 4, 2013

So i have made a query which filters the text you type in your text box on a form. This is working great, but then this morning I had some records that contain some blank fields. My query does not show those records even if they contain the same text that I would type in my search form.This is my expression in my query of one column:

Like [Forms]![searchform]![Qprojectomschrijving] & "*"

View 7 Replies View Related

Query Filters

Dec 8, 2005

If you view Query properties in design mode you will see a "Filter" property. When I put a WHERE statement in this section and click the "Apply Filter" button it works exactly as I anticipated, filtering out the records I want.

Does anyone know the syntax to change this property in VBA? Specifically, I want to add a command button to my reports switchboard that will apply a filter to a query.

Thanks in advance!

View 5 Replies View Related

Charts With Filters From A Form

Nov 13, 2007

thought this might have been easy, but no....

i want to have a form with a [DateFrom] and [DateTo] text box

you click a button, it goes to a chart and the chart is filtered between those dates (the chart has week along the x axis)

problem is, the recordsource of a chart in a report is a crosstab query and you can't put form filters into a cross tab query

have tried to ram the parameters in before opening it with


CurrentDb.QueryDefs("qry_Reporting_Charts").Parameters("DateFrom").Value = [txtFrom]
CurrentDb.QueryDefs("qry_Reporting_Charts").Parameters("DateFrom").Value = [txtTo]
DoCmd.OpenReport [cmbReports].Value, acViewPreview


but it looks like the parameters are read only or something :confused:

any ideas anyone?

thanx in advance

View 2 Replies View Related

Printing Filters In A Form

Oct 25, 2006

Having trouble printing after I performed a filter. Have a subform with continuous forms that I put various filters on..., however when printing, all the records print and not just what was filtered...Is there a way around this. Basically, I would like to be able to print out only the filtered records in my form view.

Max

View 7 Replies View Related

Handling Filters In A Form

Oct 19, 2006

hi

The database XXXXX_20061018.mdb contains the form Frm_XXXXXX.
Currently this form does not show data after it has been opened.
infact of the Me.FilterOn = False.
so please give me some idea how to solve this problem

thanking you

View 6 Replies View Related

Reports :: Have A Form To Generate Report With 3 Filters

Aug 12, 2014

i have a form to generate report with 3 filters,

1.sales_person,
2.Client_Name,
3.Product_ID

these are combo selection and the report is working fine with these 3 filters. filtering by a query. all 3 feilds on the same table.what i am unable to do is make these filters as option to select with a check box. like if i dont want the third filter product but to generate report with the other two filters sales_person and client_name.

edt: uploading my DB Form report_generator on medical_request_query and table medical_requeset

View 6 Replies View Related

Forms :: RecordSet Bound Form No Longer Filters

Sep 24, 2014

I have a number of forms that are bound to recordsets as follows:

Dim rs As New adodb.Recordset

sqlQuery = "Select * from myTable"
rs.Open sqlQuery, sqlCNN, adOpenKeyset, adLockOptimistic
Set Me.Recordset = rs
Set rs = Nothing

In Access 2003, users could open these forms and filter on basically any field by using the right click-> Text Filters functionality.

In Access 2010, this functionality appears to work (users can apply the filter and the Toggle Filter button in the ribbon shows a filter is applied), but all of the records are still visible in the form.

Any work-around that does not involve redesigning the form to be non-recordset bound?

View 4 Replies View Related

Forms :: Possible To Clear Filters Set On Subform Using Button On Main Form?

Jan 12, 2014

Is it possible to clear filters set on a subform using a button on the main form?

View 1 Replies View Related

Modules & VBA :: Form With Multi-criteria Searches / Uses Strings And Filters

Jan 23, 2014

I have a search form with blank fields tied to a table, four criteria search boxes, and a button to take the input from the search boxes, search the table, and populate the results on the form's blank fields. As of now, it works as long as all four criteria boxes aren't null.I used filters to achieve this, and here's the code that works as long as all four boxes are not empty. (My criteria boxes are as follows: a textbox called "Keyword" and three combo boxes called HRCombo, BuildingCombo, and RoomCombo, and the fields they're tied to are as follows: "Item Description" "HR Holder" "Building" "Room") My first line "Me.Filter = ..." was broken up to make it easier to view.

Code:

Me.Filter = "[Item Description] Like " & Chr(34) & Me.Keyword & "*" & Chr(34) & "
AND [HR Holder] = '" & Me.HRCombo & "'" & " AND [Building] = '" & Me.BuildingCombo
& "'" & " AND [Room] = '" & Me.RoomCombo & "'"
Me.FilterOn = True
Me.Requery

I need it to be able to do the search no matter which combination of criteria boxes have input. Someone recommended using if statements to do the following: Create four strings, one for each criteria box. Use 4 if statements to check if the box is null - if it is null, assign an asterisk to its string, and if its not null, assign the value I used for the above Me.Filter statement to each box's string. Then, use Me.Filter and concatenate the four strings at the end. Here's the code I used for this, and, with my limited knowledge, I can't get it to work.

Code:

Dim StrA as String, StrB as String, StrC as String, StrD as String
If Me.Keyword is null then
StrA = "*"
else
StrA = [Item Description] Like " & Chr(34) & Me.Keyword & "*" & Chr(34)
End If

[code]....

View 14 Replies View Related

Forms :: Recordset Filters From One User Affecting All Users On A Form?

Jul 10, 2013

Here is the environment:

Currently, I have 10 Users running a front end form that connect to back end data where they add to current records and eventually check that the record is complete.

I also have an "Apply Filter" button on the right hand side of the form that allows the user to apply filters to the records to show specific data that is not complete.

I am currently hearing that while the user is working, whether they apply filter or not, it seems as though all of a sudden, all of their completed work dissapears from their recordset hence not allowing them to go back to make changes to it if needed. I can only conclude that when a different user clicks apply filter, all users are affect some how... here are some examples of the code for the filter:

Code:
Select Case [cboFilterValues] ' Where the user selects a filter parameter from a dropdown
Case "All Data"
strSQL = "SELECT * " & _
"FROM [Data Table] " & _
"WHERE [Complete] = No

Then it does:

Code:
Me.RecordSource = strSQL

I am basically trying to find a way where only the user wanting to view the filter is affected... FYI, the other users arent actually seeing all the filters from the other user filter choice, they simply loose all their completed work from their form.

View 1 Replies View Related

Forms :: Show All Records In Datasheet Subform On Form With Combo Box Filters On Load

Apr 1, 2015

I am having an issue trying to show all records when I load my form. It loads correctly when I don't have a record source for the main form. However, the combobox filters will not work. My goal is to have users be able to use the datasheet, subdatasheet and combobox filters. I can get the form to work just fine when I link the Main form and subform, but when the form opens it is filtered on the first record. I have been successful with this approach when using other forms, but they didn't require a subdatasheet.

Is there anyway I can have the comboboxes to filter yet be able to show all records until the user selects filters? Is this possible?I finally got my Manager to agree to use a database instead of Excel files based on this form setup and I need to make as "user friendly" as possible (look and function like a spreadsheet) I attached some pics of the form along with the code for the filter.

View 1 Replies View Related

Reports :: Create A Form Which Filters A Report Based Off Of Combo Boxes Selected By User

Jan 2, 2014

I'm trying to create a form which filters a report based off of combo boxes selected by the user. The code I'm using currently is:

Code:
DoCmd.OpenReport "rptProgramAttendees", acViewReport, , "ProgramIDFK = " & cboProgramTitle

This works great to return a report if the user selects something from the combo box. How do I adapt this so that the user can also leave the combo box blank and filter the report to return all records?Additionally, what if I want to have the user filter between dates selected on the form; i.e. between 'txtStart' and 'txtEnd'

View 10 Replies View Related

Defining Relationships In Access

Apr 25, 2006

Hi,

I seem to be stuck on the simplest of tasks with both google and forum searches coming up with information that’s either too simple or too complex for my needs (not time wasted though because I’m learning all kinds of related stuff).

How do I join my tables with one-to-one relationships?

[edit] Doh, got this one now - by indexing without duplicates then saying all in one have to link to one in another:D

How do I define both fields in a linking table as composite or two field primary key?

View 11 Replies View Related

Defining Primary Key From Two Fields

Mar 23, 2008

I have this table:

intSalesID (Number, Indexed: (Yes No Duplicates)
intCarID (Number, Indexed: (Yes No Duplicates)
intQuantitySales (Number, Indexed: (No)

This table is a cross table from the two tables tblCars and tblSales where the intSalesID and intCarID are Primary Keys. In this table I didn't set the P.K. I saw databases that have P.K. in tables like this deined from the two fields (intSalesID and intCarID, would be in my case). I wanted to ask what is the difference if I leave this table like this and if I set this two fields to form a P.K.? What is the difference in these twi cases? What do I get and what I don't, if I do either way? Thnx.

View 3 Replies View Related

Defining A Checkbox As A Variable

Jun 6, 2006

Hello all,

I was wondering what should I define a chechbox as if I want to make it a variable, so that when it is checked (= -1), I can check for the -1 and loop somewhere.

Thanks

View 1 Replies View Related

Defining A Checkbox As A Variable

Jun 6, 2006

Hello all,

I was wondering what should I define a chechbox as if I want to make it a variable, so that when it is checked (= -1), I can check for the -1 and loop somewhere.

Thanks

View 1 Replies View Related

Defining A Checkbox As A Variable

Jun 6, 2006

Hello all,

I was wondering what should I define a chechbox as if I want to make it a variable, so that when it is checked (= -1), I can check for the -1 and loop somewhere.

Thanks

View 5 Replies View Related

TransferSpreadsheet - Defining Range Syntax?

Mar 7, 2005

Hi,

I am trying to auto-import data w/ a single-click from several Excel sheets. A sample line:

DoCmd.TransferSpreadsheet acImport, , "tblTS1", filename, True, Product!A1:H100

where
tblTS1 - tbl where I'm putting the data
filename - c: est.xls
Product!A1:H100 - range of data I want in sheet Product

I am having problems w/ the "range" portion of Transferspreadsheet (I know it's this portion, because it works when I pre-name the range in Excel). I have tried all sorts of variations on the syntax:

Product!A1:H100
"Product!A1:H100" or 'Product!A1:H100'
"Product" & ! & "A1" & : "H100"
"'Product'" & ! & "A1" & : "H100"
Product & "!" & A1 & ":" H100

I get the error msg:
The MS Jet database engine could not find the object '$:'. Make sure the object exists and that you spell its name and the path name correctly." or "Syntax error"

I wanted to mistake-proof the data transfer, so I did not want to:
- predefine the range in Excel (under InsertNameDefine)
- have the user enter values in text boxes

Any help w/ the syntax would be greatly appreciated!

Cheers,
dvs :confused:

View 1 Replies View Related

Modules & VBA :: Defining New Date Format

Mar 17, 2015

how shall i define my new Date or numbers.Now "yyyyXX" this is my date "y" is year 4 digits and "XX" is my problem 2 digits. I ll give an example,

(XX = 01....36) XX can be max 36 and min 01 of course. f. Exp. 201436 and next number shall be 201501.

the biggest problem is different of these number with basic math 201501-201436= 65 but for me it should be 01... The Question is; How can define these ??

View 8 Replies View Related

Defining Sampling Periods Using A Calculated Field

Jun 6, 2006

We have a db of salmon survey data where catch data is recorded by date, site, etc.
Historically, we have used ‘sampling periods’ to group our results into blocks of time that can be compared from year to year, and within year.

Now, having frequented this forum I’ve read that we shouldn’t store information in tables that can be calculated from fields and I want to try to follow that advice in this instance but am having trouble working this out.

Here’s how we define a sampling period.

1.The start date of the first sampling period in a sampling year is the last Monday in the most recent November.
2.Each sampling period is 14 days long.

What I want to do is have a query use the date of a set to calculate what sampling period the set belongs to. I have an idea that I could use a datediff function to calculate this if I can figure out the ‘last Monday in the previous November’ part. I’ve searched this forum and googled but am having trouble finding anything that I can adapt to this as a query expression.

Anyone care to help a fish bio out? Much obliged :)

View 5 Replies View Related

Defining The 3 Highest Values In A Series Of Fields

Nov 2, 2007

Hello Everyone,

I am in need of your vast array of knowledge and experience. I have been fighting with this Access report for a few days now, and I've finally decided to ask for your help.

I am running a report which provides a look at a set of 12 survey results. The 12 items are numerical in nature and are decimals with 2 decimal places. What I am trying to do is have Access automatically highlight the top 3 scores in one color, and the bottom 3 scores in another color.

So what I need is an expression that allows Access to discern the top 3 and bottom 3 from the series of 12 scores. in Excel you can identify the top score with this with the formula "Max(A1:A13)", but seeing as in Access we don't have the cell identifiers, this approach will not work.

I know that I will need to use conditional formatting in order to get the cells to highlight. I also see that there is "Max" and "Min" functions in Access as well, and I attempted to create and expression like this "=Max([field 1] AND [field 2] AND [field 3] AND, etc...)" with no luck. I also tried changing the "AND" to "OR", again without luck.

One thing that I should mention is that the report does contain a lot of other data, so I need to be able to apply whatever the best fix is, to only those 12 fields.

Unfortunately I am not accustomed to using code, and as a result I am unsure of how to input it properly. I am certainly open to code solutions, but I would also need a explanation of how to put it in properly.

The easiest solution for me, if possible, would be an expression that I can enter into the conditional formatting wizard to tell it to highlight the values.

If anyone has any ideas, I would appreciate it. I'll buy you a virtual beer :-)

View 5 Replies View Related







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