Lookup Value Based On 2 Fields
Jan 16, 2008
I have been working with a simple Dlookup to return a value based on the data held in a specific field. I am now trying to develop this further and need some help.
I have a query "QryMainForm" that brings together fields from 2 tables "TblFS" (fields: Ref, score 1, score 2) and "TblFamily" (fields: Familyname). the query adds the values in Score 1 and Score 2 and saves the value as "points".
Seperatly from this i have a table "Tbllevels" which contains the fields Score, Operational, Admin, Technical. with the points scored relating to a value within each field. What i need to do is run the lookup based on the both "points" and Familyname fields contained in the query.
So the TblLevels looks like this:
Score.....Technical.....Operational.......Admin
100........................... Level 1.........Level 2
200 ........Level 1..........Level 2.........Level 3
300.........Level 2..........Level 3
400.........Level 3
So someone who scores 300 points could be assigned to the technical or operational group (this is done manually). What i need the lookup to do is to return the level based on the points and Familyname fields located on "qrymainform"
any ideas on how i can do this one?
View Replies
ADVERTISEMENT
Oct 28, 2014
I have two tables, one table (1) hold three fields, one of those fields is the master key (index). The other table (2) has a field which I want to lookup from table 1, that part is working. In the combo box I get all three fields displayed as I make my selection. I want to copy the other two fields as text at the time the lookup index is selected. I do not what the fields to automatically update each time the table is displayed. I have looked at update macros, I've looked at VBA.
View 1 Replies
View Related
Jul 27, 2015
I have three large source tables imported into my database. I have created queries to retrieve relevant values from fields in each source table which feeds into my form. Each field on my form that is connected to the relevant query is a lookup field. For example, one field called "Supplier_Name" another called "Supplier_Code" and a third called "Route_Number".
Needless to say each of my lookup fields are very long. I am trying to filter my search based upon the selection from the previous Lookup field. How I can filter a lookup field's value based upon the previous lookup field selection? Each Supplier has a code and assign route(s) and I have already established these relationships.
View 4 Replies
View Related
Mar 2, 2005
Hello,
I wonder if anybody can help me.
I have a table called ITEM, within ITEM I have three fields ITEM NUMBER (Key Field), Item, Cost,
I have another table called INVOICE ITEMS, Within INVOICE ITEMS I have six Fields, INVOICE NUMBER, ITEM NUMBER, ITEM, UNIT COST, Amount, Total Amount.
I want to use Lookup wizard to complete the fields ITEM NUMBER, ITEM, UNIT COST from the ITEM table.
Is this possible?
Regards
Nathan
View 1 Replies
View Related
Oct 26, 2005
I apologize if this has been adressed. I searched but did not find it. Partially I think because it won't let me use the word 'two' in the search. That's kinda important in this case.
I know how to make a lookup combo box. I used the wizard and copied and pasted the code, actually. What I need is the code to base the lookup from two combos.
For example, the records in my table contain information about different districts on certain dates.
I'd like to lookup the record that matches both the Report Date combo and the District combo.
Thanks in advance.
View 12 Replies
View Related
Jul 8, 2013
Custom Autonumber based on lookup. I am creating an access database where autonumbers to be work.
I have a table with Segment Name my main table will lookup the values of segment table.
Based on the Segment I choose Autonumber has to be created
My main table to house each record (tbl_import) has the following fields:
ID
Segment
Port
MOT
TOTAL CIF
Child table - Segment contains
Development
Deployment
Testing
So based on segment field which I choose
Development autonumber has to set DEV-1001 and Deployment has to set DEP-2001, TEST-3001
My thought is if there a way to code the Segment field to lookup the segment what I choose based on the Autonumber series starts (similar to a vlookup in excel), then concatenate the DEV in the Record ID field.
View 2 Replies
View Related
Oct 3, 2007
Hi. I'm quite poor with Access, so sorry if this sounds dumb.
I have a table of customer records (tbl_customers), including name, address & postcode etc
I have a spreadsheet of customers their postcodes from a different system that shows customers who have bought a particular product.
Is there a way that I can create a query that lists those records in tbl_customers whose postcode is matched in the spreadsheet?
Jim
View 3 Replies
View Related
Nov 25, 2013
I attached a screenshot with notes that describes my problem.
View 2 Replies
View Related
May 18, 2007
I have two tables(tblInvoiceItem and tblItems). On both of these tables there is; ItemNo and ItemCost. tblItems already has various records about items. I want to be able to have a lookup field for ItemNo on tblInvoiceItems which will populate the ItemCost from tblItems.
Basically when I pick an item number(lookup field on tblInoviceItem, looking up from tblItems), I want the price which corrisponds with it to appear in the correct field(ItemCost on tblInoviceItems).
Hopefully I explained that okay :confused:
View 5 Replies
View Related
May 30, 2005
Hi, not sure if this is possible or the most economical approach but here goes:
I have a lookup table (tblHolidays) with a list of holiday dates (fieldname "HolidayDate") in it.
I need an update query that can check all "StartDate" values on a table called "tblMasterLog" and where this date matches the ones on "tblHolidays", will add 1 day to the "StartDate" and then keep repeating until there are no more dates to change.
Can this be done?!
Thanks in advance
View 2 Replies
View Related
Nov 15, 2013
I have two tables, "Membership" and "Class." The Class table has a class ID, class name, and cost of the class.
In the Membership table, I have a field to accept a class ID that is entered by a user. I also have a column called Tuition. When the user enters a classID in the Membership table, I would like the dollar amount associated with that classID to automatically appear in the field called Tuition in the Membership table.
I tried the LOOKUP data type and calculated fields, but no luck. I know that DLOOKUP can be used on forms, but I don't see how it can be used directly with tables.
Is this even possible?
View 1 Replies
View Related
May 28, 2007
Hello there,
I've lately come across some posts that condemn using lookup fields in tables. But how bad is this really? I mean it's quite a nifty feature, and it'd be really too bad if it hogs up resources, thus forcing us to leave it alone for performance considerations.
I'd appreciate if any of you guys/gals with more experience on the topic would like to share some, so I can take a better stance for future developement.
Regards,
Jaime
View 10 Replies
View Related
Feb 11, 2008
Hi,
I have a table that has 3 columns.
Issue, Review, and Information.
These 3 fields get their data from the same lookup table that holds some code values.
So I'm trying to create a query to export to excel that shows the data for this table, but for the lookup fields, I just get the ID's from the lookup table.
So the table is like this now
ID...Issue...Information....Review
1.......2..........5...............1
2.......1..........12..............6
So I would like to be able to display what the ID numbers actually are, but having trouble getting a query to do this for all 3 fields.
I can run a query that shows 1 field's but not all 3.
what I would like to see
ID.....Issue...Information....Review
1.......2a.........4c.............e5
2.......1a.........3c.............2F
all 3 columns use code_ID from the lookup table.
Is there a way to do this? or should I have used 3 different lookup tables for these?
View 13 Replies
View Related
Feb 12, 2005
I am working on a project that I know I am making more difficult then it need be...... Maybe because I started with a form and tried to build everything else around it. The database looked bad...... Now it looks good... normalized as I can see it... But trying to get the information in is being difficult.
The DB has customers, thats no problem. These customers have inspections done to areas for cleaning.
I have done the areas in a drop down, in one table, and the task to be rated as a dropdown in another table. Then finally a rating table....1 to 5.
It is very easy to go in in datasheet view and input the info for each area, then pick a task from the next dropdown and then pick a rating from the final.
Problem is this won't be as easy for someone else to input. So here is the form problem.
Heres how I would like to lay it out. An over all inspection form. Areas inspected and rating (average)
I will use a command button from the main form to open up say "area1"
On the area one form is the first problem....
I want 6 different task to give a rating to...... But these task are on a dropdown....so I can not bring over the field more then once.... or I dont know how..It's getting confusing and I don't think it should be.... its a pretty simple one.
So can anyone guild me to a databse similiar to this? I need to see how one like this is done.
Thanks
View 1 Replies
View Related
Apr 25, 2015
The lookup has a two column dropdown: FirstName and LastName. This is for the field, Sponsor, however I want to concatenate the First and Last name and have those stored in Sponsor. How do I do that?
Note: I just did it in the Lookup query.
Now a related problem is when I make a change to the table (e.g. Lookup), the change does not show in the form. Is there a way to "refresh" the form? My work around was to delete and re-add the field...I'm sure that is not the correct way to do it.
And when I added the field, the caption comes along with it bound to the field. Is there some magic keystroke to break the bond?
View 8 Replies
View Related
Aug 31, 2013
I want the lookup to be performed with criteria based off of the same row that record being selected is on.
I wrote typed out the Columns and rows that my queries return, and attached a screenshot as well.
You enter your phone number which provides you with an indexed location. Based off of that location only certain products are available and I want them to be filtered accordingly. I have it working to some extent, here is an example below:
|Site Name|Phone Number| Location |Products Available|
| Store 1 | 5044645521| KNNRLABR
The lookup displays products available where the indexed products match the same location. Here is what the query returns:
| Location |Products Available|
| KNNRLABR| Product 21 |
| KNNRLABR| Product 9|
| KNNRLABR| Product 7 |
| KNNRLABR| Product 3 |
This is the affect that I want to achieve but, if I add another location like so:
|Site Name|Phone Number| Location |Products Available|
| Store 1 | 5044645521 | KNNRLABR |
| Store 2 | 3609061624 | VANCWA01|
The lookup returns all products available for all the records for each location entered rather than based off of the selected record.
| Location |Products Available|
| KNNRLABR | Product 21 |
| KNNRLABR | Product 9 |
| KNNRLABR | Product 7 |
| KNNRLABR | Product 3 |
| VANCWA 01 | Product 31 |
| VANCWA 01 | Product 8 |
| VANCWA 01 | Product 4 |
| VANCWA 01 | Product 3 |
| VANCWA 01 | Product 1 |
Is there a way I can make the lookup run off of the location specific to the current row that I am working on?
P.S. Here is a copy of the SQL statement I'm using right now.
SELECT DISTINCTROW [DSL Product CLLI's].CLLI, [DSL Product CLLI's].Speed, [DSL Product CLLI's].CLLI
FROM [DSL Product CLLI's], [Copy Of Copy Of Customer NPA-NXX's - ADSL - Data - Internet]
WHERE ((([DSL Product CLLI's].CLLI) In (SELECT DISTINCTROW [Location] FROM [Copy Of Copy Of Customer NPA-NXX's - ADSL - Data - Internet] WHERE [Copy Of Copy Of Customer NPA-NXX's - ADSL - Data - Internet].[Location]=[DSL Product CLLI's].[CLLI])));
Which Returns the Following in my lookup field for Products Available.
View 6 Replies
View Related
Dec 19, 2013
I am attempting to develop a DB to track hardware assets, e.g., servers, switches, storage devices, etc... I am at the very beginning of the development/design process. I haven't gone beyond the paper stage yet. I am trying to figure out how I would set up the main Asset table so that when I put in a particular vendor, the model field will list models only for that specific vendor. i.e., when I put in IBM in the Vendor field I will only see IBM models in a drop down for the Vendor_Model field.
I'm pretty sure this will involve a Lookup field. But, how do I restrict the lookup of models. Would that be with a query?
View 2 Replies
View Related
Aug 3, 2014
I am designing a database for a quarry for maintenance of their machines. I have a table that has a full list of all the parts on the machines, and a multiple value lookup field that says what machines said parts are used on. I am trying to have these values translate to another table, so I can then insert a field to say how many of each part are used on the respective machine, to display on an information form for each machine.
I would also like this table to update if the relevant information is updated, for example if a new machine is input, then have the table update to reflect what parts are used on it (an After Update function?) I have made a query that gives me the read out I want (attached) but just cannot figure out how to get that into a table so I can add the extra information.
View 1 Replies
View Related
Apr 12, 2005
I have a database that keeps track of inspection records. What I want to be able to do is open the form Inspection, and select a part # in a dropdown. When I do that I want it to fill in all of the critical item/dimension boxes on that same form for that part number that I selected above. I tried to figure it out from the sample database example on here, but I just cannot figure it out. Any help is greatly appreciated. A copie of my database is attached.
View 4 Replies
View Related
Jul 12, 2007
Hi, all! I'm once again needing your sage, wise advice.
I was reading on MVPS.org, and found a page that denounces the use of lookup fields in tables, because of the way it skews relationships, weighing down the database.
http://www.mvps.org/access/tencommandments.htm
(#2)
Do you all agree with this?
What do you recommend I do, in lieu of lookup fields, when I need to maintain integrity of the data.
Thanks SO much. You guys are my heroes!
KellyJo
View 2 Replies
View Related
Oct 13, 2014
When I set up lookup fields that point to a table do I save those tables in the back end with the main tables or is it okay to have in in the front end and not the back end? Users will need to make udpates to the tables for instance an employee table they would need to add employee names.
View 2 Replies
View Related
Jun 5, 2013
I have a query that based on certain codes in a record does multiple joins to pull in other codes... I want the query (based on these pulled in codes) to do a lookup in another table to extract 1 field that has a description...
Can I do this in one query??? Do I need to do a Make Table to first pull in the codes and then do a second query with a DLookup based on those fields???
View 3 Replies
View Related
Oct 21, 2012
I have a member table and donation table. For a donation, I'd like to lookup the last and first names from the member table. I set the lookup for the last name and can see bothe first and last names in the drop down list. When I pick, I get the last name in the DonationT but how to I pick up the first name? That is, how do I fill DonorFirstName in DonationT from the FirstName field in the MemberT?
View 3 Replies
View Related
May 27, 2013
I am developing a database for a school and I have a form for staff addresses where the city is a drop down box that auto fills the state and zip according to the data in the lkuptblCity. All is working fine EXCEPT we have an Address 1 and Address 2 field for the employees.
I have two separate fields in the Staff table to store the data, as needed for reports. I have two separate fields on the form but they will not work due to pulling from the same table.
View 1 Replies
View Related
Apr 26, 2012
So, the Person table has 2 IDs (neither is the primary key of the table, like SSN and HRID). What the customer wants is to show both IDs in the Orders table.I'm having trouble getting the table to populate the second ID field based on what is selected from the drop-down in the first ID field.
Person table (ID, FirstName, LastName, SSN, HRID)
Orders table (ID, PersonSSN, PersonHRID, etc.)
If I populate the Look-up field of PersonSSN as 'Select SSN, HRID from Person' (use column 1 as value), how do I get the HRID field to populate when someone selects a SSN value from the Person drop-down?And the follow-up, can I get the same thing to happen in reverse (i.e. populating the PersonSSN value when the customer selects an HRID from the PersonHRID drop-down)?
View 2 Replies
View Related
Oct 20, 2014
I am using Access 2010 and I have a table containing a list of chemicals (Analytes) that I am working with and their Chemical Abstract Service number (CAS). I am trying to use this table as a basis for generating other tables that will be used to create quality control criteria for specific analysis methods. As such, I will need both fields populated for each subsequent table. I have been able to successfully create a lookup that will pull the Analyte name, but I want the same lookup to fill the CAS number. How do I make this work?
View 14 Replies
View Related