Simple Query Not Working (Filter)

Oct 18, 2007

I have a query that filters two tables. 1) Status 2) Name

The status is 1,2,3,4,5 from an option group on my form.

In the query I have <>3 for the status, whereby I only want records that are status 1,2,3,& 5.

When I run the query with all names it works perfectly, however I am trying to run the query for only a select few names versus all of them.

The problem is I do not know how to select only a few names versus all of the names and make it work. When I try to add names i.e "Doe, John" my Status pulls all records including option 3.

Can anyone help? I do not even know where to start seaching.

Thanks.

Fen How

View Replies


ADVERTISEMENT

Very Simple Query Not Working....

Sep 15, 2005

we have a main table for tracking pickups....some of the fields are combo boxes with relationships to other tables....one such relationship is units (ml, gallon, ounce, etc)...in the main table everything works just fine....a user enters the location info, the amount and the corresponding units. thus, an example would be a user picks up something from building X, room 101, 10, Gallons.....the 10 refers to the gallons, the user picked up 10 gallons...

now for the query:
i'm creating a query for which i will base a report on...in query design if i just select the above info everything works fine....it comes out on the report as 5 Gallons....however, what i'd like to do is concatenate the two fields so that they take up less space on the report and are more visibly appealing...here's what i tried in query design:
Amt: [amount]&Space(1)&[units]
this does not work....in the units table that provides Gallons as a selection in the combo field, Gallons has a key value of 5.....thus, when i run the query using the above code i get 10 5 - where 10 is the amount the amount and 5 is the key from the combo box...

i've tried bringing in the units table but then i get a type mismatch....how can i concatenate the two fields and show the proper units? this has to be simple but i cannot get it to work... :mad:

View 4 Replies View Related

V. Simple Query, Not Working

Jun 25, 2006

Hi Lads

Hi guys, I want to return all the records which contain information under a particular column heading, hence the statement thats supposed to return all tables where Sector colum is not empty. I am new to SQL and Access so not sure why this simple query isn't working. It is a subform and displays the results in the "details" section of the form below the controls.

I think it could be something to do with the fact that its a subform, but Im not sure about this.

Me.RecordSource = "SELECT * FROM [tblRecordInfo] WHERE Sector <> "" "

any ideas guys? any assistance is greatly appreciated

thanks in advance

View 2 Replies View Related

Simple Query Not Working

Oct 11, 2006

I have a six table database and have a query to show all records,(at the moment) but although i have put 3 records in for testing it only shows the first record. Any help gratefully recieved i'm pulling hair out.:mad:

View 3 Replies View Related

Simple Query/Form Not Working...

Oct 5, 2006

I have a table filled with computer monitor information (tblMonitorManagement). I had query that uses combo boxes (cboSerialNo, cboRoom, cboDepartment) on a form for search parameters. The query is called qryMonitorManagement_Sub. The results are displayed in a subform (frmMonitorManagement_Sub). This works for both my desktop and also my laptop based forms/queries/tables.

Although this form works when using cboRoom and cboDepartment, it does not work when using cboSerialNo, so I decided to simplify it down to get to the root of the problem...here's what I did.

I created a new form, created a combo box (again called cboSerialNo), and had it look up the serial numbers in tblMonitors. Simple.

I created a query called qryMonitors_Test, added all fields from tblMonitors (not using the * option). I then set the SerialNo field criteria to the contents of the cboSerialNo on the new form. Simple. For now I'm ignoring searching on anything else.

I ran the query with no search parameters before I added the criteria, and it obviously displayed all the records in tblMonitors. Fine.

After adding the criteria (using Build...to prevent typos), I used the form to select a serial number, run the query and get no results returned.

If I copy and paste the same serial number and change the SerialNo criteria in the query to search for that it works fine. As soon as I tell it to search for the combo box contents it returns no data.

This is driving me completely bat-poo. It's nothing I've not done a squillion time before but it just refuses to work. I've got to assume it's a query issue as opposed to a form issue, but things don't get much simpler than this should be!

View 6 Replies View Related

Simple Delte Query Not Working

Oct 25, 2007

Hi Guys,

I've tried searching the forums for an answer with no joy.
I'm trying to create a very simple DELETE query, which I've never had an issue with before.

Basically I have two tables

Dbo_PDRPerson (PersonID, RoleID, PDRID)
tbl_InfoByPDR (PDRID)

Basically I want to delete all records in Dbo_PDRPerson where a corresponding PDRID record exists in tbl_InfoByPDR

My current method:

DELETE dbo_PDRPerson.PersonID, dbo_PDRPerson.RoleID, dbo_PDRPerson.PDRID
FROM dbo_PDRPerson INNER JOIN tbl_InfoByPDR ON dbo_PDRPerson.PDRID = tbl_InfoByPDR.PDRID;

This tells me to "Specify the table containing the records you want to delete"

Any ideas

Many thanks

View 2 Replies View Related

Queries :: Filter Not Working In Crosstab Query?

Apr 17, 2014

I have a table like this

Cultureworkload
ReasonfortestingIRLNumberDiagnostic sputum specimens processedFollow up specimens processedReception
Follow up7/20130102-Jan-13
Diagnosis8/20131002-Jan-13
Follow up9/20131002-Jan-13
Diagnosis10/20131002-feb-13
Follow up11/20131003-feb-13
Diagnosis14/20131003-Mar-13
Diagnosis15/20131003-Apr-13

I built a query with the wizard to group by Reason for testing

The SQl was

TRANSFORM Count(Cultureworkload.IRLNumber) AS CountOfIRLNumber
SELECT Cultureworkload.Reasonfortesting, Count(Cultureworkload.IRLNumber) AS [Total Of IRLNumber]
FROM Cultureworkload
GROUP BY Cultureworkload.Reasonfortesting
PIVOT Format([Reception],"mmm") In ("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug"," Sep","Oct","Nov","Dec");

Although I filtered reception field by month to 1st quarter it shows empty months like Apr,May Jun etc.

View 3 Replies View Related

Simple Sql Statement Not Working

Mar 2, 2008

i have an sql statement:

aa = "hello"

Tasklist.RowSource = "SELECT [Tasks].Staff_Name, [Tasks].Project_Title, [Tasks].Percentage_Complete FROM [Tasks] WHERE [Tasks].Date_Allocated < aa ORDER BY [Tasks].Staff_Name;"


how can i make it look the the data i put in "aa" rather than prompt a msg box asking for "aa"?

View 5 Replies View Related

Very Simple Yet Cant Get It Working...toggle Box Switch

Mar 19, 2008

Hi

Using a toggle box to ask the following question, i have data that contains either OPEN or CLOSED against each record. I tried using the following in the criteria for the specific data to either select all the OPEN records when the box is clicked and i would like to select all records OPEN and CLOSED when it is nto clicked

IIf([Forms]![MEQN_ProdACStn_Picker]![Toggle38]=True,"OPEN","")

This didn't work and a number of other attempts failed as well...

How do i do it in the criteria selection or is it not possible

Cheers

Newbie Jasper

View 7 Replies View Related

Tables :: Simple Cascade Update Not Working

Oct 29, 2013

I've done this tons of times, so I don't understand what's happening... The title says it all: when I update the ID of one record of the main table, the referenced records on related tables won't update even though they have a relationship between them with the option "Cascade update" clicked.

In the attached database, the main table "Expedientes" is related to table "Actuaciones".

View 1 Replies View Related

Need Help With A Simple Filter?

Dec 16, 2006

This should be easy; I'm tring to select records that contain certain words in a table layout. I right click in the column, select filter for, but what criteria do I use if I want to find all records with, say, the word aerial in the column?

Thanks, Airpix

View 2 Replies View Related

Filter By Form Not Working Properly

Feb 13, 2007

Hi,

I'm working in Access 97 and I've got a form that I want to use to create filters with.

There are a couple of things that I'm not clear about and I'd appreciate any suggestions that you can make:

1. The form seems to remember the last filter, so when I click on the Filter by form button it shows the last filter by default. I've included the following in the click event:
RunCommand (acCmdRemoveFilterSort)
Me.FilterOn = False
RunCommand (acCmdFilterByForm)
Surely either of the first two statements should remove the filter, shouldn't they? and if not then what are they for?

2. I can't get the 'OR' tabs to show at the bottom of the filter by form screen unless I apply the filter once and then click on the filter by form button again. Is there any way of forcing these tabs to appear?

Thanks for any help/advice you can offer.

Regards,
Bernard D

View 2 Replies View Related

Form Filter Not Working In Subform

Aug 8, 2005

platform : access (adp) / sql server
Problem : form filter not executing in subforms

When I goto one of my subforms I can activate the form filter.
When executing the form filter no records show up, it just keeps showing my criteria. When disactivating the form filter I receive an error message telling that my view must be misspelled (it's about spaces). My view is called Vw_people , as a record source it works fine so it can't be misspelled.

Is the problem the adp connection or the subform? I don't know

View 1 Replies View Related

Filter Report By Form Not Working

Nov 4, 2006

I have a report "Work Order Details" that that is based on a query and opens along with a form that is used to set filters. Based on samples I have looked at and reading, I cannot figure out what is missing. When I select my item form one of 5 unbound combo box 's and click the "Set filter" button, it brings up a paramter box?? If I cancel out the box, I still don't get a result. Just for the heck of it, I filled in a name in the paramter box, still no luck. The report property has "Filter On" as YES. The close button, clear button, and drops downs operate perfectly.

Here is the On Click Event info from my "set filter" button:

Private Sub Command28_Click()

Dim strSQL As String, intCounter As Integer
'Build SQL String
For intCounter = 1 To 5
If Me("Filter" & intCounter) <> "" Then
strSQL = strSQL & "[" & Me("Filter" & intCounter).Tag & "] " & " = " & Chr(34) & Me("Filter" & intCounter) & Chr(34) & " And "
End If
Next

If strSQL <> "" Then
'Strip Last " And "
strSQL = left(strSQL, (Len(strSQL) - 5))
'Set the Filter property
Reports![Work Order Details].Filter = strSQL
Reports![Work Order Details].FilterOn = True
End If

End Sub

View 2 Replies View Related

Modules & VBA :: Filter Not Working In Navigation Form

Jul 20, 2014

I inherited this quote and trying to enhance it but having problem.

The filter in navigation form is not working but it is on its own form, the filter is working without problem.

View 5 Replies View Related

Modules & VBA :: Navigation Form - Filter On Subform Not Working

May 12, 2015

I have a navigation form which has two subforms on it (ie 2 tabs linking to different forms). I have got aq filter working for one of the forms but not on the other. This is using

If IsNull(Me.txtoperationscontract) Then
MsgBox "Please type a contract number into the textbox!", vbInformation + vbOKOnly, "Incorrect Details"
Else
Me.OperationsSubform.Form.Filter = "[Contract]='" & Me.txtoperationscontract.Value & "' "
Me.OperationsSubform.Form.FilterOn = True
End If

The problem is that it does not work on subform B because the Contract field does not exist.

View 6 Replies View Related

General :: Wizard Not Working When Adding Filter Buttons

Jun 19, 2012

I seem to be having a problem with access 2007

When I use the filter by form, filter by selection, and toggle filter buttons located on the ribbon, they work normally on my form, in the usual way.

However when I use the button wizard to add the various available filter buttons to my form, it adds the buttons with the correct graphics on - but in form view clicking on the buttons does not actually do anything.

I've tried running compact and repair but still the same.

View 5 Replies View Related

Modules & VBA :: Filter Properties Not Working First Time On Subform

Jan 13, 2015

I have a form that uses a listbox. I can select multiple items and then update a subform. When I press a button with VBA and use the filter property on the subform for the first time, nothing happens. When I press the button a second time, it does - and it works thereafter with different selections. It only happens that first time, after loading the form and pressing the button for the first time.

I have tested that the list items are accessible via the vba variables and stepping through my code and the problem starts with the filter properties.

the statement:

Me.sbfrmCluster.Form.FilterOn = True
Me.sbfrmCluster.Form.Filter = strFilter

is not switched on first time (I have tried a requery and refresh statement after this). When I step through the code the first time, the FilterOn property remains false. A second button press and it is fine.

View 2 Replies View Related

Forms :: Quick Filter Not Working When Memo-type Fields In Form

Jul 1, 2013

I recently made a new version of our database complete with forms, querys etc.. using Access 2010. It looked good and nice, but we encountered an unexpected problem. In all forms that contains memo-type fields quick filter is not working (there is no lists, checkboxes etc..). My users really like quick filters and are understandably irritated. I would understand if this disappearance would affect only memo-type fields, but it affects ALL the fields.

I also know that there are problems with memos in Access 2010. I have tried to make new forms, but every time I add memo fields quick filter stops functioning. I have also tried to change properties, options and what not, but to no use. In older versions of our forms this feature works just fine, but they were made in older version of Access (don't know which since oldest ones are from year 2003).
Television

View 3 Replies View Related

None Working "simple Code" On Close Event?

May 16, 2006

I have witten a code in the close event of a "Primary" form that would update a Combo boxe on a "secondary" form only if the "secondary" form is open.
ie:

Private Sub Form_Close()
If Forms!frmEnquiry.Open Then
Forms!frmEnquiry!CboCustomer.Requery
Else
DoCmd.Close
End If
End Sub

This code keeps giving me an error, is anybody has got any idea why?
Thanks in advance.

View 7 Replies View Related

Simple Like Query

May 11, 2005

Hi there,
I have a really simple question.
I have a field in a table that contains comments (text format). I want to run a query where I can get only the records that contain the word "high" in the comments. There may be some typos so I would like records returned that also contain something like "high". High is not the only word in the comments.

Does this make sense?

Thanks,
Row

View 4 Replies View Related

Simple Query..

Jul 26, 2005

Hi guys, wondering if you could help me, I can't seem to get this right..

I have two tables in question:

Items: StyleTypes:
------ ------------
ItemID ItemType
ItemType StyleType
Style
Lots of Attributes

ItemType is a list of items (Table, Desk, Bookshelf, Chair)
Style is a type of style for the item (Circular table, Radial Desk)

I want to create the Items.Style field based upon a query of the StyleTypes. So if a user types "Desk" in Items.ItemType then the Items.Style field will be limited to only those Styles which match that selected item within the StyleTypes table.

Think thats clear enough, but my attempts have all failed, hope you guys can give me a push in the right direction, thank you!

View 4 Replies View Related

Probably A Simple Query....

Apr 5, 2006

Hi all,

I have very little knowledge of databases and even less about writing queries.

The problem:
I have a database that lists cities (such as Paris, London, New York etc) as rows and employment status (Full-time, Part-time, Unemployed etc) as columns.
I need to go through each city and record which employment status is greatest (for each city) and present it in a new column. I can do this manually but I’m sure a query can be created to automate the process.

Hope that all made sense. Can anyone suggest ideas on where to start?

Many thanks,

Carl

View 1 Replies View Related

Simple Query..need Help If Possible

May 6, 2006

hi
have just designed a rather simple music database for my dad to use at home as he has large collection.
have a table with the heading"artist" and another one with "album" ...my problem is that on the table there maybe 1 or more instances with the same artist but with different albums...when i run a simple query for ..say artists starting with the letter"a" i may get about 10 cases of the same artist appearing in my query when all i want is one...(depending on if i may put in say one artist like abba having 10 albums etc)...i am entering each artist with the album each time so i may enter the artist in say 10 times....depending on how many albums etc

if you understand all that...i would be grateful if someone could help me with a simple query
alan

View 7 Replies View Related

Simple Query

Jul 4, 2006

I have a query that returns the uncompleted jobs from a single table ( its a calls database)
all i need is query that returns the amount of uncompleted jobs onto the switchboard I.E whatshername has X amount of uncompleted jobs , i have done a search and most of the solutions are very complicated for what i want to do .....anyone any ideas ?? pls

View 2 Replies View Related

Simple Query, For You - Not Me

Jul 6, 2006

Thanks in advance to anyone who helps.

SQL and Access are both new to me. I have purchased some books (which are still in the mail), and have gone through this forum (which seems to be a little more advanced for me at this moment).

I have a database that contains Business_Unit (Store Numbers), Post_Date (Last Date of Inventory), and other misc. stuff. Anyways, My goal is to pull the latest date of inventory for each individual store before the last ninety days. What I have so far:

SELECT DISTINCT informix_shrink_head.business_unit, informix_shrink_head.counting_event_id, informix_shrink_head.post_date, informix_shrink_head.delta_cost, informix_shrink_head.delta_count, informix_shrink_head.count_reason_cd, pcw_loc_master.closed
FROM informix_shrink_head, pcw_loc_master
WHERE (((informix_shrink_head.post_date)<=Date()-90) AND ((pcw_loc_master.closed) Is Null))
ORDER BY informix_shrink_head.business_unit;

However, I get the same store multiple times and for multiple post dates.
I do not even know if this can be done in one simple swoop, or if I need to create another table and re-query that? Any assistance or comments would be much appreciated.

Thanks,
A Gator

View 1 Replies View Related







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