Tables :: Run Lookup With Unique Criteria Based Off Each Individual Record

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 Replies


ADVERTISEMENT

Opening A Form Based On Individual Record

Oct 6, 2004

All my records are displayed on a form. Upon clicking on their respective 'View' button, I would like to open that particular record. How can I do that? I have attached a screenshot for better clarity. Thanks in advance for the help!

Regards,
Swee

View 3 Replies View Related

Queries :: How To Set Rolling Year Based On Individual First Record

Mar 31, 2014

I wanted to know if it is possible to set a rolling year based on the first recorded date for an individual. In other words, my table is updated every time an employee receives a point. The record includes the employee's name (empName), the date (dateOfOccurrence), and the point (occurrencePoint).

I would like to create a query that would be based on a rolling year from the very first record of an employee based on the first dateOfOccurrence. The first date/record of this employee would be the start of the rolling year. I am writing this in SQL in Access 2013.

View 1 Replies View Related

Queries :: Drawing Register Database - Lookup Specific Criteria Based On Date

Aug 11, 2014

I have a drawing register database which notes the revisions for all drawings issued. One drawing can be revised several times so I have a details table which notes the revision letter, date issued and the notes for each revision. Using this table I created a max date query to show the latest issue date and revision for each drawing. This query is used for a transmittal form for issuing drawings. Both the form and report is working perfectly.

The TBLTransmittal consists of the following fields
ContractName
IssueDate
SubSup
DwgNo (multi-value checkbox)

Using the TBLDwgRegisterDtls or the query QRYDtldDwgReg (which includes the drawing titles) I would like to create a query that would look up the latest revision at the date of issue and show the revision letter.

I started a query combining TBLTransmittal and TBLDwgRegisterDtls and in the criteria for DateIssued of the TBLSDwgRegisterDtls (which is when the drawing was issued by the architect to the contractor) I put "Not > [IssueDate]". This is filtering the information to show revisions issued up to the date we (the contractor) issued the drawing to our sub-contractor but I need now to pull the max revision only from this information.

Before I go I will give you an example of what I want from the end result

Drawing BK2-02 rev. D was issued by the architect to the contractor on July 17th. This drawing was in-turn issued to our sub-contractor (Sub "A") this Saturday, August 9th. The same drawing was revised this morning and rev. E was issued to Sub "A" today, August 11th.

I want the end report to show that Sub A received Rev. D on 09-08-14 and Rev. E on 11-08-14.

I'm wondering if another max date query on this new query would work? I'll try and see what happens.

View 2 Replies View Related

Tables :: Lookup Table Based On Relationship

Nov 25, 2013

I attached a screenshot with notes that describes my problem.

View 2 Replies View Related

Modules & VBA :: Create Unique Reference Number Based On Field Values For Record

Jun 18, 2015

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.

View 2 Replies View Related

Update Query Based On Lookup Tables Values

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

Tables :: Database To Track Hardware Assets - Lookup Based On Value

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

Tables :: Unique Record Entry - Index Or Primary Key Cannot Contain A Null Value

Dec 6, 2012

I am building a database to capture monthly statistics on a number of items. I want to ensure that users don't enter statistics for the same item for the same reporting period. I found the following instruction, but can't make it work:

It suggests that I create multiple primary keys in the table

When I do it, it comes back with an error: Index or primary key cannot contain a null value.

View 6 Replies View Related

Tables :: Converting Excel Table For Lookup Of Values Based On Row And Column Headers

Sep 3, 2014

how data is best structured in Access.I have a table of values (for instance: weight) and I need to be able to look up a weight based on the column header (age) and row header (height).How is this sort of data best structured and accessed in Access?

View 12 Replies View Related

Joining Two Tables, Based On Criteria

Dec 5, 2004

Hi,
This is my first question... please guide me

I have two tables say Daily and Master, and now I want to
update the Daily table and add two additional fields in this table
based on the data from the Master table.

Please suggest me..

View 10 Replies View Related

Cannot Allow Duplicate Records In 2 Tables Based On 2 Criteria

Sep 26, 2005

Dear all,

I would like to seek your help on this problem.

I would like to do a search for my records based on 2 different criterias. If found, the function should just return a boolean value so that I can act further based on the boolean value.

The reason I'm doing this is that I have 2 similar tables that contains EventID and AttendeeID and these 2 tables cannot have the same EventID and AttendeeID. So before I can allow a record to be inserted in the 1st table, it must check that there is no record in the 2nd table that has the same EventID and AttendeID. If there is, then i cannot allow the record to be inserted in the 1st table.

The same thing applies when I want to insert a record in the 2nd table. It must now check the first table.

Recordset.find seems to be only catering to 1 criteria, not 2.

Pls help. Codes are most welcome too.

View 3 Replies View Related

Updating Data On 2 Tables Based On Criteria

Oct 8, 2004

Ok. Here's the situation. I have query setup. This query has 2 columns:
1. Agent Name
2. Sale Value

I have 2 tables.
Table1: Includes Sales for this pay period only
Table2: Includes all Sales From past to present.

We are setting up our system on Tiers and Each sale value is going to change. So, Here's what I need:
I need to run an update query that first Looks up all the records in Table1 based on Agent Name. The field that needs to be updated is called SaleValue. It needs to be updated with what's in my Query mentioned above.
Then, all the values in Table1, need to be copied (or updated) into Table2. This can be done based on the Primary Key (SaleID), which exists in both tables. So I guess we will need to run 2 separate update queries. Any ideas on how this can be done?

View 8 Replies View Related

Filtering Lookup Value Based On Other Lookup Values

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

General :: Deleting Record Based On Double Criteria

Nov 30, 2012

I am wanting to delete a record based on 2 criteria. ive had a look on the net and it looked so simple. I tried

PHP Code:

CurrentDb.Execute _    "DELETE FROM tblRecommendedProducts " & _    "WHERE ClientDetailsID = " & [Forms]![frmClientSale]![ClientDetailsID] And "WHERE ItemsID = " & [Forms]![frmClientSale-Retail]![ItemsID], dbFailOnError 

View 14 Replies View Related

Forms :: How To Select A Record Based On Multiple Criteria

May 15, 2013

I have a list of client stored in a table "Clients". I would like a form to present a user with the next client in the list at the click of a button, but there will be some exceptions:

Some clients will be given priority, and should be moved to the top of the list although they may not be the next logical entry in the table. Priority clients are indicated by a field "Priority" with a Yes/No option set before work begins.

Some clients will have requested a call at a certain time of the day - This time will be stored in a field named timeToCall. The next user to click the button after the time has passed should be given that clients details.

When the end of the list is reached any clients who could not be contacted will be tried again. My table currently has a field "Attempts" to track this, but that may not be needed. Clients who have been dealt with will be removed from the "Clients" table to a "Completed" table.

Whichever record is selected will be flagged as being dealt with so that 2 people don't get the same entry. I may add a new field for this, but right now I plan to use the "attempts" field to control this

I am unsure of the best approach to the above, I'm not very well-versed in Access, but if I were doing this in Excel (as originally requested by my boss) I would do it like this:

Use a form where the "Next" button will use VBA code to first check if there are any priority clients, then check if there are any timed client's ready to call and then move to the next entry that has had 0 contact attempts. Whichever record is the next one will be displayed in the form to the user.

View 1 Replies View Related

Forms :: Returning Values From Tables Based On Criteria

Jun 27, 2013

I have two tables that will contain the information that I need the third table that will be used for constant data entry to auto fill in two of the fields (Class, Rate)based on four criteria from the first two.

Table 1
EmpID Name
1 EMP1
2 EMP2

Table 2 (A Subtable of Table1 based on EmpID)
EmpID ACDate Class Rate MJob SJob
1 1/6/13 A 15 100 1A
1 2/6/13 B 20 100 1A
2 1/6/13 A 18 100 1B

Table 3
Name WDate MJob SJob Class Rate
EMP1 1/7/13 100 1A A 15
EMP1 2/5/13 100 1A A 15
EMP1 2/6/13 100 1A B 20
EMP2 1/6/13 100 1B A 18

View 2 Replies View Related

Tables :: Limit Data Input Based On Another Fields Criteria?

Dec 22, 2014

I have two tables linked by ID (Table1,Table2)

The Table1 holds data that is a request for a task.

ID, Request, Task_tms (the number of times the task is required to be done)

1, Make a cup of coffee,15

Table2 is my allocation of people to the tasks.

ID, Person, Task_done (the number of times this person has done the task)

1,Sally,10
1,Eddie,5

What I want to do is to limit the amounts of allocation in some way (ie in this case if I have already put 10 for Sally then I would be unable to put anymore than 5 when entering the amount for Eddie.

Additionally if I were to allocate all 15 to Sally then no additional people would be able to be allocated to this task (ID 1)

The two table are in datasheet format linked on a form.

View 1 Replies View Related

Forms :: How To Create Small Form To Search For Record Based Off Criteria

May 28, 2013

I currently have a database which contains various information for part returns. Among this information is contained a parts tracking number, VIN Number, and Date Code. I want to have a small dialogue box (Form) where a user can enter a tracking number, (or a date code or VIN if tracking number unavailable) to search for a record containing that tracking number. I have already created a replica of my new part entry form to view parts in read only mode only.how to create small form to search for record based off criteria then open the replica form i have made to that record?

View 6 Replies View Related

LookUp Tables For Dynamic Set Of Attributes: Set A Pointer Or Use A Generic LookUp?

Jul 24, 2007

I'm wrestling with the issues; in other threads, it became apparent that because I could not know ahead of time what I will need to know about a given entity, I will use a table to enumerate attributes that is applicable for a given entity.

However, the stumper is that what if an attribute should conform to a set list of values? Since they are dynamic, I would have problem predicting what I will need to be able to lookup, and am even don't know whether I will need a one-many lookup or many-many lookup.

I thought that generic lookup table with a table listing "classes" of lookup would allow me to have one big generic lookup table while using "classes" to act like virtual tables so I can then set the query to appropriate "class" to return just right set of values.

But as I thought about it, I ran into some issues which is pulling me toward the crazy idea that I should have freestanding tables, and use a field in tblAttribute to give me the table's name so I'd know which free-standing table it points to, and have the necessary key to lookup the values within that table.

Even though my gut instincts tell me that I shouldn't be going against the conventions of database design (who the frick goes around creating free-standing lookups?!?), I'm simply not sure how I can use a generic lookup table to hold all information.

For example, suppose I was given a list of values that has its own categories. Since the former design allows only for two level (lookup and lookupclass), where am I to insert that extra level?

Furthermore, I found myself needing a set of virtual keys to reference a certain "class" of lookups for report purposes. That means I need an extra field in my lookup table than I originally anticipates. What if I find myself needing one more field that just won't fit the generic lookup table?

So does anyone have suggestions on how we would create a placeholder for a lookup table that will be made just in time?

View 4 Replies View Related

General :: Emailing From Access - Individual Records To Individual Emails

Jan 8, 2015

I have a database where I record grades for my students. I would like to create a macro so that every time I record a grade as an "F", the student will receive an email that will contain an attachment of their scores. A lot of the information I want to include in this email is in several different tables. So to make it easier, I have created a query that lists the following:

Students name (SName)
Student's email (SEmail)
ID# of the form I use to record their grades (ID)
ID# of the studen'ts work (WorkID)
Date of their work (CreatedDate)
Date I graded their work (AuditDate)
Grade="F" (Accuracy)

How can I create something that will automate emailing of this information--to the individual student with only their information? I am using Access 2010. If I can't automatically send the emails, I would like to create a button in my audit screen that will send a report containing that student's information to them.

View 1 Replies View Related

Modules & VBA :: Generate And Send By Email Individual Reports Based On A Query

Mar 19, 2014

I am trying to make an automation in order generate reports based on query ( person name,person email address ) , export them to a folder in PDF and then send them one by one to each person email address.

What is happening:

- the reports are generated and exported fine
- the email are sent to the right addresses but the first person receives the correct report , the second person receives the report from the first person plus its own report and so on.

Here is my code :

Private Sub MakeReportSendEmail_Click()
Dim MyDB As DAO.Database
Dim MyRS As DAO.Recordset
Dim strSQL As String
Dim strRptName As String

[Code] ....

View 14 Replies View Related

Modules & VBA :: Send Individual Pdf Attachment To Individual Recipients

Feb 3, 2014

I have created a database that generates a report with customer debts. I have a lot of customers and in a report each page is a different customer with individual debts info. What i would like to do is to create a button and distribute individual report page as pdf to individual customer by email. I'm using Lotus notes. I have searched the forums i found something but it was not what i was looking for.

View 1 Replies View Related

Individual Controls For Each Record

Jan 28, 2005

I have a continuous form based on a query. I would like to have a button or control that performs some command on only one certain record. In other words, the user sees the record he wants, clicks a button and it changes the value or changes the color. When I add a button to the form, it appears next to each record and performs the same command to each record. I have tried different controls, but get similar results with each one. Even a single form seems to do the same thing, but on different pages.

Am I missing something? Or maybe I am not following the concept of the form.

View 13 Replies View Related

A Record For A Group Being Displayed For An Individual

Oct 18, 2005

Hi I'm a teacher and have to set targets for classes, I have created a database which allows me to input targets for the classes. I now need to then display the class target for individual pupils in a new layout. I am sure there is an easy solution and I am looking at the problem from the wrong direction. Thank you for any help

graham

View 3 Replies View Related

Importing .csv Data Each As An Individual Record

Mar 9, 2007

Man I thought this would be simple, but it quite clearly isn't!

I have a .csv file that contains around 250 email addresses. I simply want to import these into an Access table, each email creating a new record!

NO using the import function only seems to allow you to import data as long as each separate piece of data is on field in a record! I understand whent this might be the case, but why the hell can I not import it so each piece of data is a separate record in the table!!!!!!!!!!!

Please note I understand some sort of complex query may do it, but I am not that experienced with that yet and so don't know how it's done!

Please can anyone offer a simple solution? From where I am sitting, there does not appear to be one!!!!

Thanks.

View 3 Replies View Related







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