Compare 2 Fields To Get 3rd Field...
Apr 13, 2006
Hello,
I have 2 tables:
tblProviders
ProviderName
ProviderAddress
ProviderType
LocationCode
FacilityType
Etc...
tblFacilityType
ProviderType
Location
FacilityType
In tblFacilityType, the FacilityType field is a combonation of ProviderType and Location. Each of those fields are alphanumeric. What I want to do is have the FacilityType field in the the tblProviders table to look at the Location and the ProviderType fields in the tblFacilityType table to determine what the FacilityType field in the tblProviders table should be.
Hope that is understandable.
Thanks in advance for any assistance.
View Replies
ADVERTISEMENT
Feb 5, 2008
Can someone tell me if this can be done somehow.
I have a date field, ID field and a memo field (I have to have this memo field).
I want to compare the memo fields by two certain dates and find out what doesn't match and if the ID field is blank. I have been trying with quaries but no luck.
I am not sure what forum this would fall under so I put it in general. feel free to move.
View 7 Replies
View Related
Jun 13, 2014
Need to compare 2 fields in a query, and return the larger of the 2 values in a 3rd field.
As in:
Field A=10 Field B=6 I need Field C to = 10.
Field A=5 Field B=6 I need Field C to = 6.
View 3 Replies
View Related
Mar 6, 2006
Hi there
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.
Thanks in advance for the assistance
Craig:)
View 2 Replies
View Related
Mar 12, 2006
I have a field called Badge_Number in Table A.
I have a field called Badge_Number in Table B.
In Table A Badge_Number has entries 101, 102, 103, 104, 105
In Table B Badge_Number has entries 102, 103
How can I do a query to get a list of entries that are in A but that are not in B. (Query result would be 101, 104, 105)
This is the only thing I have to do in Access, so after trying to learn this for a while, I have decided it would be much easier to get help at this time.
View 2 Replies
View Related
Aug 8, 2007
Have devloped a database to log all support issues for an application I work with.
I periodically update the database by importing from another database
for example my main table tbl_issues has fields IR_NO, DESCRIPTION and STATUS
I then import data from tbl_import which also has these fields. The following query works fine:
UPDATE tbl_support
SET tbl_support.STATUS = tbl_import.STATUS
WHERE tbl_support.STATUS <> tbl_import.STATUS
AND tbl_support.IR_NO = tbl_import.IR_NO
However I also want to do this at the same time:
UPDATE tbl_support
SET tbl_support.DESCRIPTION = tbl_import.DESCRIPTION
WHERE tbl_support.DESCRIPTION <> tbl_import.DESCRIPTION
AND tbl_support.IR_NO = tbl_import.IR_NO
How do I update both fields at the same time?
View 2 Replies
View Related
Aug 9, 2005
Hello..
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
View 8 Replies
View Related
Aug 27, 2013
Text fields name:
Password
confirmpassword
Trying to achieve:
on "After update" event for Confirm password a code needs to find if both Passoword and confirmpassword are having the exact character (Case sensitive).
Below code doesn't recognize the Case. It allows as long as both words are same:
Dim StrString1, strString2 As String
StrString1 = Password
srtString2 = ConfirmPassword
[Code].....
View 8 Replies
View Related
Jun 18, 2014
I would like to change the colour of field on a form if the date in that field is later than the date in another field.
View 9 Replies
View Related
Jul 18, 2013
I have a table called tblAuthorizations. It appears as follows
AuthInstanceID....ConsumerID....AuthNumberID....Au thStart....AuthEnd....PSRUnits....BSTUnits
1374006036.........356679..........20255102....... ...4/22/13......7/21/13.....0..............416
-432536491.........356679...........20255102....... ...1/21/13.......4/21/13....104..........416
-124970517.........356679...........20147863....... ...10/23/12.....1/20/13....208..........520
504564357...........469432..........20254788...... ....4/22/13......7/21/13....0..............520
282523535...........469432..........20254788...... ....1/21/13.......4/21/13....0.............520
I work in mental health, and when we put in a request for a consumer to receive PSR & BST services, we put the above information into our database. Each record identifies which consumer the authorization is for, a start date and end date for them to receive services, and the amount of two types of services (PSR and BST). When one period ends, we request another period, such as in the first three records above, and then the final 2 for another consumer.
What I need to be able to tell is how their service authorizations change. For instance, if I were to compare the first and second records, it would tell me that PSRunits decreased 4/22/13-7/21/13 from 1/21/13-4/21/13 levels.
I have a query that displays the records for each consumer for the current period, but I can't figure out how to identify the previous period's number of PSRUnits or BSTUnits.I've tried adding the following fields, but this isn't working.
PrevEnd: (Select Max(AuthEnd) from tblAuthorizations Where AuthEnd < Auths.[AuthStart])
PrevBST: DLookUp("[BSTUnits]","tblAuthorizations","AuthEnd=" & [PrevEnd] And "ConsumerID=" & [ConsumerID])
View 2 Replies
View Related
Dec 4, 2013
I'm trying to create a query that will compare the data in 3 fields in a record, choose the largest (I also have a criteria to order by if more than 1 field has the same entry and it's the largest of the 3), and then group by that.The fields I will need are as follows:
PRODUCT table:
ProductName
Chemical
ChemicalAbstract
PhysicalState
NFPAHealth
NFPAFlammability
NFPAReactivity
qryQuantityOnHand query (which doesn't link directly to the PRODUCT table, it links through associations with other tables):QOH...I will eventually need information from another table for the final reports, but I don't think it has to be included in this query.
The fields NFPAHealth, NFPAFlammability, and NFPAReactivity each may be 0, 1, 2, 3, or 4...I need to ignore blanks; if 1 of the above fields is blank, they will all be blank.For any record, I need to compare the number in those 3 fields to each other, and choose the largest number and group by that rating.
In other words, if the largest of the 3 numbers is a 3 in the NFPAFlammability field, all those products need to be grouped together.If the same number appears in at least 2 of the fields, the order that determines the grouping is: Flammability, then Health, then Reactivity..Ultimately the report will be grouped as follows:
Flammability
Rating 4
Product 1
Product 2
Product 3
Rating 3
Product 1
Product 2
Product 3
Rating 2
Product 1
Product 2
Product 3
Health
Rating 4
Product 1
Product 2
Product 3
[code]....
and each of the groups will be sub-totalled.I'm stumped at trying to create the query in the first place.The added aggravation here is that we are dealing with 23 stores, each with their own mix of products. I have another table that contains the information about which products are in which store.
View 4 Replies
View Related
Mar 2, 2006
Date:
Date...............Item...................Status
200601............A........................OK
200602............A........................Not OK
200601............B.......................OK
200602............B........................OK
200602............C........................OK
I want to construct a query which can only show result as follows:
200601............A........................OK
200602............A........................Not OK
200602............C........................OK
..by comparing the status change
Any brilliant idea? (preferably not using dlookup)
View 1 Replies
View Related
Dec 1, 2014
I have a form that users put in information and then it updates to a table. It works fine but i would like to add something. Right now there is a text box called item that the user puts in the item number. The problem is that sometimes they put in a wrong number. What i would like to do is have it when they hit the update button to compare that item number to a table that lists all of them. so if the text box doesnt equal one of the numbers in the table dbo_item and the field itm_num, i want it to give them a message box with an error.
View 6 Replies
View Related
Jun 25, 2015
I am programming an Acess Database, the primary data come from an excel sheet. Since Access one to many relationship only works for primary key and another field in another table as foreign key, I can't have normalized database.
I will explain what I mean with a hypothetical situation.
So, let's say I have two tables: WindowT1, CustomerT2.
WindowT1 has fields: WinID (the pk), WindowName.
CustomerT2 fields include CustID (pk), CustomerName, WindowName, WinID.
So, in table "CustomerT2', WinID is the foreign key and I need that field filled in to make one-to-many relationship between these two tables to work. CustomerName and WindowName will be imported and prefilled already from an excel file with append query.
My question is can I make a update query (after the initial append query that brings in the data into Access) such that the criteria is matching WindowName (from CustomerT2) and the update would be the corresponding WinID (the pk number from WindowT1) that would be filled in the field WinID (in CustomerT2)? I know for this to work tables must have relationship and I did that.
Is there a better way to accomplish this task? i.e. through a form (remember info will be prefilled, so can't use combo box to fill in another form field) or maybe can I do this using the first append query (that brings in data)?
I am not good at Macro or VBA. The only thing I have done in code builder is After Update event in forms while using combo boxes. So, if there is no easier solution, I will try to deal with codes.
View 11 Replies
View Related
Jun 10, 2014
I need to run a condition that compares 2 field quantities together based on the same item. If they both equal the same then i want it to run a code and change a property for that record.
I will have a OrderQty and a Total receivedQty when these 2 equal each other then it updates the items Status to Received. What is the best way to accomplish this? in vba or queries/sql?
View 4 Replies
View Related
Feb 18, 2014
In VBA, how to compare date variable with date/time field from table, as when defined the data type in table, date/time option is the only choice for date data type even though I don't want the time portion.
View 13 Replies
View Related
Jul 10, 2015
I inherited a database that has two tables that are structured identical; one called tblcurrentdata and the other called tblpriordata. The user wants a report or export query that only shows records that has differences between prior weeks data and the current weeks data. The tables have 12 fields of data in a record per quote number. The user wants a query or report to identify the QuoteNum and any changes between the prior and current records. The table structures are as follows:
Code:
tblCurrentData/tblPriorData:
QuoteNum
CoName
State
ZipcodeNo
priorityColor
[code]...
QuoteNum 12345 field 5 (prioritycolor) changed from red in the prior week to green in the current week and field 7(POC) changed from Scott in the prior week to Jonson in the current week.QuoteNum 23451 did not have any changes therefore does not need to be listed in the query/report Unmatched query doesnt work because it does not compare multiple fields. I tried to structure a union query and use <> in each field but got too tedious and didnt give the expected results.
View 14 Replies
View Related
May 9, 2007
Is there some free software somewhere to allow me to compare the vba in two differnat access dbs highlighting the differances??
THanks
View 2 Replies
View Related
Dec 21, 2006
Hi All:
I need a mechanism that takes the excel spreadsheet or table and determine if there are any new deal groups. (In this spreadsheet I allready have a deal group field) I will be using Book and DealGroup as combination primary key to compare against the table "8 -- YTD Principal Investments" which will hose the YTD numbers and serve as a historical table we will update throghout the year.If there is a new deal group the append into table "8 - YTD Principal Investments"
Thank you
View 1 Replies
View Related
Apr 26, 2007
Please help with query/report. I have the following problem.
One student evaluates course before and after. There is several questions related to this evaluation (all are same before and after) and for one question there is 5 possible answer (stored in option group)
I would like to build a report or a query where I can compare data from each student (before and after) for all questions. Is this possible to do in access.
So, StudentA: questionOn: answer: one columen: before, second column: after…. Next question.
View 1 Replies
View Related
Jan 4, 2007
Hi, all.
I have string: strSQL = SELECT SUM column FROM table
I need compare it with constant number, for Example:
If strSQL > 50000 Then ....
its not working, any Ideas?
Thank You in advance
View 4 Replies
View Related
Mar 8, 2007
Hi there!
I'm bulding this database where the user will have to insert a full phone number. What I would like to know is? if is there any way where Access can pick the first 5 digits of the number to compare with information already imputed in. by example if the user input the number 01942789789, access pick the number 01942 to look for a match? I know I could do with two diferents fields one for the code number and other for the number, but my boss only want one field. Is there anyone that could help me
Thanks
www.joaobeca.co.uk
View 1 Replies
View Related
Aug 19, 2005
I have a table that shows Part Numbers. Each part number can be listed multiple times depending on how man Build ID's it is associated to.
Example:
Part Nubmer 123456 could be associated with:
Build Id's F187, A910, F001, C810, E010, C809
or it might only be associated to 1, 2, 3, 4,or 5 of those Build Id's.
What I want my query to do is find any Part Number that is only associated with anything less than all six of the Build Id's.
Example:
Part Number 123456 is only associated with:
Build Id's F187 & A910 or only F001 & C809 or only E010.
If this was the case I would like for that Part Number to show up in the Query along with whatever Build Id's it is associated with as long as it is not associated with all six Build Id's. The Build Id Field is also part of the table.
Any help on how to do this.
Hope all of this makes sense.
Thanks!
View 1 Replies
View Related
Feb 8, 2006
Hi,
I've made 2 tabels tblIn and tblOut,
Now I want to make a query which get the differences between the number of product A in tblIn and the number of product A in tblOut the same for product B,.... It's possible that there is nothing in tblOut from product X so the query just has to show the number of tblIn of product X, I've tried a few things but i can't make the query can anybody help me???
thx
View 4 Replies
View Related
Mar 5, 2007
I have two list's of names. I'm able to run a query to find the matches but the ones that don't match i also need to id?
For ex. List a has 200 names List b has 130 names, how can i find the 70 names that don't match?
View 4 Replies
View Related
May 31, 2007
Situation:
Have 2 Tables that contain the same information, one table was used during registration and had the Data changed
Question:
How do I pull a comparison query to match the registration table to the Main table and pull only the data that is different so I can update the main table with the new Information? :confused:
View 2 Replies
View Related