Hi, I am trying to compare two columns' values within the same QUERY table, but I kept on getting the "Data type mismatch in criteria expression" error. What am I doing wrong?
Here is my Select Query Statement: SELECT qryDedparmDedetail.EMP_ID, qryDedparmDedetail.[Employer Amt], qryDedparmDedetail.[Employer Actl], qryDedparmDedetail.[Admin Amt], qryDedparmDedetail.[Admin Actl], qryDedparmDedetail.[Employee Actl], qryDedparmDedetail.[Employee Amt], qryDedparmDedetail.FirstOfSTATUS, qryDedparmDedetail.FirstOfAGENCY, qryDedparmDedetail.FirstOfTITLE, qryDedparmDedetail.FirstOfFORMAT_NM, qryDedparmDedetail.RepUnit, qryDedparmDedetail.FirstOfDEDTYPE_CD1 AS Expr1, qryDedparmDedetail.SumOfNBR, RepUnit.REPUNITDESC, qryDedparmDedetail.LeftType FROM qryDedparmDedetail LEFT JOIN RepUnit ON qryDedparmDedetail.RepUnit = RepUnit.REPUNIT WHERE (((qryDedparmDedetail.[Employer Amt])<>"Employer Actl") AND ((qryDedparmDedetail.LeftType)="01"));
I am making a dp for end of day sales, and i want to compare data in a table to the numbers inputted in a form and see whether this value is higher or lower. the table displays the target sales figures for each day, and the form allows the area mangers to enter in the current day figures.
I am building a tracking database where we would be able to track information which field are null data and report them to our Administration to fill the null data. For this I have created a form name "Search" and I have a combo box control on that form which is bound to "Table = employee" and its ROW SOURCE TYPE="Field List", I would like to able to query records where the selected value in this combo box is null through out the table.
For example if I select "Telephone" from this combo box dropdown, I would like the query to show all the records where the "Telephone" is null, how to set the criteria in query to take the combo box value as "Field Name" and then compare it with the Field/Column in the table and show the null values.
In one of my tables I have a field with the following characteristics:
Listbox row source: SELECT Category.CategoryID, Category.Category FROM Category ORDER BY Category.CategoryID; row source type: table/query bound column:2 column count: 2
This gives the user the opportunity to see the category as well as the categoryID when choosing, however once selected only the CategoryID (which is a number) is visible.
I would like to put the same option on one of my forms, but Im not succeeding at this. How can I do this? Is this possible?
This leads me to my next question: If I want to load the information from the form and compare it in VBA with the one from the table, is it seen as a number or a string? I hope it is clear.. Any thoughts on how to deal with this?? Thank u.. Stacey
Hi. I need create a query that can compare different time values. My time field format something looks like 12:59 PM. And compare other fields that has +- 10 minutes from my input. It means when I input 12:00 PM to the query inputt then it lists records that have times 11:50 AM and 12:10 PM. But I don't know how to compare these..they are not natural numbers..but they aren't text niether.. I tried to do it [Arrive_Time] + 10 [Arrive_Time] - 10 in the criteria..but..doesn't work.
Any idea if there's a way to compare values between two subforms on one main form?
I have a Required Inventory and and an Actual Inventory subform. I want the Actual Inventory field to be conditionally formatted to turn red if it is less than the corresponding required field and green if it is more. I know how to use Conditional Formatting, but I don't know how to reference the values in the next form.
Note: I have no problem using conditional formatting compared to values in the parent form. The syntax I used for that was:
I need to compare the sum of a values in a column of rows with the same id. For example:
Code: ID Value1 Value2
122222 20 40 (these are okay, the sum of Value1 in rows with same ID equal value 2) 122222 20 40 333333 100 100 (ok) 111111 50 100 111111 50 100 (not ok, the values with same id add to 150, so the first row containing this id should be deleted so the the total of Value1 equals Value2) 111111 50 100
This is probably quite easy but I cannot make it work so would appreciate some help. I have a table containing vehicle information. I have 2 fields, Current Mileage and Max Mileage. I want to do a comparison of the 2 fields and should the Current Mileage be greater than the Max Mileage, the query returns the Vehicle Registration. Test data has been entered in the table I am querying and I was expecting 1 value to be returned. However the query as I wrote returned either all the vehicle Registrations or none of them. Can someone help with this please.
I am trying to to find a way to show all the positive values with nagative, in order words, if the value is 10,000 is should be followed by corresponding -10,000 so that the user could investigate if the entry is a reversible GL.
I was able to use the UNION ALL qry. But, when I have another file (like original2) that does NOT have all the columns listed in the UNION ALL qry, I get a Parameter value box asking for the missing columns when I run the qry.
original 2IDDateGroupChristianJohnny18/6/2013A212528/6/2013B2338/6/2013C2248/6/2013D22
The UNION ALL qry includes all the possible resources ( includes all the possible column fields Christan, Johnny, and Steve).
When I run the UNION ALL qry with the original2 file, An "Enter Parameter Value" box is displayed with the mssing column name "Steve".
Is there a way to Map the original2 table into a working table with all the columns, or use VBA code to construct the UNION ALL qry to only include the existing columns? My data has variable columns and I'm trying to avoid the parameter popups.
How do you compare one record to the previous record? I have a query that shows items sold. It is sorted by day with today on top. I would like to create a column that has a 'thumb up' or 'thumb down" if todays was a better day than yesterday.
I have tblClasses, tblEmployees, and tblRegistrations. I have a registration form with EmpName and subformClasses, which allows me to register one employee for several classes at a time.
My registration form has an OK button. I need a message to appear (on btnOK click) before adding a new record to the registrations table that indicates if the employee has already had training for the one or more of the classes selected in the subform. Then the option to "Yes" add the record anyway, or "No" cancel the record.
I have everything working except, I can’t figure out how to do the comparison with the subform and generate my "Yes/No" option. I’m hoping that one of you wonderful access geniuses will have a relatively simple suggestion for me.
I've been looking everywhere to find a better way of finding duplicates in a table and then recording and adding another value in that record together.
Let me try to explain better.
example:
I have a table that has 2 columns "Name", "DOB". I would like to find all duplicate "DOB" and add all of the "Name"'s together.
Quote:
Name DOB bob 19800201 Sam 19761211 Jim 19800201
The output I would like is to have Name = bob & Jim DOB = 19800201.
I've tried using the find duplicate wizard in access but I can't seem to group them together and just to find the duplicates it takes upwards of a minute.
I want Access to automatically generate a reference number for a record based on the values in on two other fields for a given record using a form.
The first field is called Operation Number.
The second is Bag Number.
The reference number needs to be in this format: 19C.3.1
Where 19C is the Operation Number, 3 is the bag number, and 1 is automatically generated. Additionally I need the last number --the automatically generated one--to go back to 1 if with each new bag number.
This is kind of like library catalog numbers. Not sure how to do this.
I have a table of customers who report trouble on their equipment. I would like to compare the date in the current record to the previous record to see if it occurred within 30 days. Can I do this with an SQL query or expression?
I have table A with a list of Work Instruction references (WIREF) and a Issue number (ISSNO).I have Table B wth employees and they too have a Work Instruction (empWIREF) and Issue number (empISSNO).I want to check if the Work instruction Issue has changed since the employee was trained
check: WIREF = empWIREF and ISSNO <> empISSNO for all records in table B
test_id | test_Name | test_Date | test_value ------------------------------------ 1 | Company A | 01.01.2010 | 0,90 2 | Company A | 02.01.2010 | 0,95 3 | Company A | 03.01.2010 | 1,10 4 | Company A | 05.01.2010 | 1,05 5 | Company B | 01.01.2010 | 0,9 6 | Company B | 02.01.2010 | 1,20 7 | Company B | 03.01.2010 | 1,15 8 | Company B | 05.01.2010 | 0,95 9 | Company B | 07.01.2010 | 0,80
The important level is 1,00
Now I will, for each company, check:
- Is the value of ID-1 >1 AND the value of the ID-2 <1, THAN give me a 1 - Is the value of ID-1 <1 AND the value of the ID-2 >1, THAN give me a -1
In this example the result should look like this:
Code: test_id | test_Name | test_Date | test_value | test_Code_result ------------------------------------------------------------- 1 | Company A | 01.01.2010 | 0,90 | 2 | Company A | 02.01.2010 | 0,95 | 3 | Company A | 03.01.2010 | 1,10 | 4 | Company A | 05.01.2010 | 1,05 | 1 5 | Company B | 01.01.2010 | 0,90 | 6 | Company B | 02.01.2010 | 1,20 | 7 | Company B | 03.01.2010 | 1,15 | 1 8 | Company B | 05.01.2010 | 0,95 | 9 | Company B | 07.01.2010 | 0,80 | -1
Probably I have to carry out this in vba.but i dont know how I can calculate across the datapoints (rows).
For each company, I would like to compare the rating from 201201 and 201202 (and keep going for each month) and if there's a change in the rating, update rating_change to the difference in rating values.
I'm trying to compare a Currency formatted field to a Number formatted one and getting wrong results.other then formatting the Number as Currency too ? Tried to use Val() but the Currency returned 0
In my table i have three columns for data entry. They are Subject 1, Subject 2, Subject 3. I need to be able to produce and query that will bring results up if for example 'english' is in anyone of these columns. I know how to do it for just one but i need it to be able to check all three columns?
I have been trying to figure this out for a long time. Any tips/helps is much appreciated it.
I have a table with 3 columns(SSN,DeductionType,DeductionAmount). Let say I have 100 employees. There are 3 records per employee, because each have 3 different deductionType(TypeA,TypeB,TypeC).
I want to create a queryTable that will result with 1 record per individual, with TypeA,TypeB,and TypeC as column names and the DeductionAmount as their values. Make sense? Below is an example of what the new table should look like: