Help - Lookup Issues (looking Up A Referenced Field)

Feb 14, 2007

OK, Here is my issue:

CustomerTable:
PK:CustomerName

AgreementTable
PK:[Lookup]CustomerName from Customer Table:Agreement#

AddendumTable
PK:[Lookup] Customer Name:Agreement# from Agreement Table


So, Each customer may have more than one agreement.
Each agreement may have more than one addendum.

So when I create a table to create a new addendum, naturally I would like to link this to an agreement (which has already been linked to a customer). When I do the lookup wizard for the agreement field however, instead of being returned a list of customers, i get the PK of the customer and not the customer name.

How do I get the lookup to show the customer name and not the PK.

View Replies


ADVERTISEMENT

No Unique Index Found For Referenced Field Of Primary Table?

Apr 12, 2013

I am trying a to build a slot booking database in which users will be able to book slots (ranging from 1-30) on a particular day for a specific site (location).

When trying to build the relationship between slot in tbl_available and slot in tbl_appointment i get the following error "No unique index found for the referenced field of the primary table" the same error pops up when trying to build a relationship between site in tbl_available and site in tbl_appointment.

I need both relationships to be 1 to many.

View 1 Replies View Related

Tables :: Error - No Unique Index Found For Referenced Field Of Primary Table

Oct 8, 2013

I am trying to create a one-to-many relationship between these two tables. I want to be able to access the 3 fields on the [Processors] table within reports based on [AllItems]. [AllItems] is a listing of account activity where the [AccountNumber] repeats. I have every field set as the "Primary Key" on [AllItems] as that is the only way to avoid importing duplicate data. I am getting the error: "no unique index found for the referenced field of the primary table"

View 3 Replies View Related

Tables :: Lookup Field Using Another Multi Value Lookup Field As Data Source

Nov 23, 2012

how to do a particular thing in Access 2010 (I don't even know if it is possible).

I have a table named PRODUCTS:
ID_PRODUCT (primary key, autonumber long integer)
ALLOWED_OPTIONS (multi value text lookup field: "Option 1";"Option 2";...;"Option 9")

So I can store, for each different product, none, one, or more options to let the customers choose from.

I have a table named ORDERS:
ID_ORDER (primary key, autonumber long integer)
FK_CUSTOMER (foreign key, linked to the primary key of a CUSTOMERS table; represents the customer that places the order.)
FK_PRODUCT (foreign key, linked to PRODUCTS.ID_PRODUCT; represents the product that the customer has choosen)
CHOOSEN_OPTION (lookup text field; the customer must choose ONE option among those allowed for the product he has ordered)

The problem is that I would like the CHOOSEN_OPTION field to show as a combobox, listing the values stored into PRODUCTS.ALLOWED_OPTIONS, so that when a customer buys a product, he can choose only among the options allowed by that particular product.How can I manage a multi value field to populate a combobox, in which every item stays on its line? If I use, as a query to populate the combobox:

select [PRODUCTS].[ALLOWED_OPTIONS]
from PRODUCTS
where [PRODUCTS].[ID_PRODUCT]=[FK_PRODUCT]

I obtain an empty combobox.If I refer to the last field as [ORDERS].[FK_PRODUCT], Access asks me to type a value for "[ORDERS].[FK_PRODUCT]", treating it as an unknown parameter.I think that the problem is that when the combobox expands, the record is not committed yet, so FK_PRODUCT is unknown (NULL?). But this happens even if I commit the record typing something in FK_PRODUCT and then I re-enter the record and I expand the CHOOSEN_OPTION combobox, that is still empy although FK_PRODUCT exists, now.Is there a particular syntax to refer to a field in a record not committed yet (something like "THIS." or "ME.")?

View 5 Replies View Related

Referenced Image Issues

Sep 28, 2006

Hi,

I have a database where by users can input images. The database then copies the selected image into the current working directoryimages (c:dbimages as an exmaple) the it keeps a reference to the path in a table. When users then browse the records on the form I have an ImageFrame which looks up that path and displays the picture. This all works fine.

The problem I have is that sometimes the working directory changes. I then have problems with the previous images inputted as the tbale where the reference is stored is still pointing to c:dbimages. How can I can it so that rather than have a fixed path to c:dbimages the database will just looking in the current application directoryimages for the pictures?

Many Thanks,

View 2 Replies View Related

Tables :: Referenced ID Twice In Same Table?

Nov 2, 2012

use the same referenced ID more than once in the same table? I have a database for my stamps. The exact same type of stamp may be kept in more than one location (Album). So, I have TBL_Albums which has two fields "AlbumID" and "AlbumName". Can I use "AlbumID" in my main RecordSource "TBL_Main" more than once to reflect the different Albums this stamp may be found in without causing any major problems to the database?

If this is okay, I could then assign different alias names to each "AlbumID" column in "TBL_Main" such as Location1, Location2 etc to be able to tell them apart on forms etc.

View 13 Replies View Related

Referenced Crosstab Query Does Not Always Have Information Required

May 11, 2007

My database is built using Access 97.

I have the following table and 2 queries:

Table: “Materials Master Sheet”
field: “Material”
field: “Re-Order Level”
field: “Re-Order Quantity”

Query (crosstab): “Most Recent Count Numbers”
field: “Material Name” (joined to table’s “Material”)
field: “Count Quantity”

Query (crosstab): “Orders Pending Delivery”
field: “Material” (joined to table’s “Material”)
field: “Total Orders”


I am attempting to create a query called "Count vs ReOrder" with the following fields:

1. “Material Name” - comes from “Most Recent Count Numbers” query

2. “Order” - if the inventory count has reached the reorder level point, then 1, else 0; criteria: 1
expression: IIf([Most Recent Count Numbers]![Count Quantity]<=[Materials Master Sheet]![Re-Order Level],1,0)

3. "Suggested Order" - reorder quantity - count of any orders pending delivery; criteria: > 0
expression: [Materials Master Sheet]![Re-Order Quantity]-[Orders Pending Delivery]![Total Order]


This works great if all materials have orders pending delivery. However, if there are no orders pending (material not displayed in crosstab query), the material is not displayed (even though, in reality, the suggested order should be >0)

Currently does this:
material 1 - count = 1, re-order level = 2, re-order quantity = 8, orders pending = 4: shows material and suggests ordering 4 (correct)

material 2 - count = 2, re-order level = 2, re-order quantity = 4, orders pending = 4: material not shown (correct, as suggested order would be 0)

material 3 - count = 2, re-order level = 2, re-order quantity = 4, orders pending = 0: material not shown (incorrect! should be shows material and suggests ordering 4)

How can I go about addressing the missing “Orders Pending Delivery” numbers?

View 2 Replies View Related

General :: Delete Employee From DB However Keep Referenced Records

Aug 18, 2014

I have a main table which records employee,date,record employee is related to tble employee. i want to be able to delete an employee however keep the referenced records with the name, date, record, is this possible?

View 3 Replies View Related

Modules & VBA :: QDF Not Getting Parameter From Referenced Queries / Form

Jan 15, 2015

I'm creating an amortization schedule database using Access 2010.

I designed it such that I'll input actual principal and interest amounts in tbl_LoanActivity when I get statements in. I'd like to be able to press a button to update forecasted principal and interest amounts, then later I'll add code to make a report pop-up.

I initially designed this with only one loan to see if I could make the thing work, and it did. I've since added another loan and made adjustments, and this is where I'm having an issue.

tbl_LoanActivity references tbl_Loans, which has interest rates and monthly payment amounts. Needless to say tbl_Loans is the RecordSource for frm_Loans, and as such has a field LoanID. I have two queries that need to reference [Forms]![frm_Loans]![LoanID]:

1) qry_LoanActivity_MaxDate,
2) qry_LoanActivity_withPrincipalBalance

I can run these 2 queries (individually) with a reference to frm_Loans.LoanID just fine. (Without that reference, forecasted principal and interest numbers are highly inaccurate.) I have a qdf append query (vba) to calculate forecasted principal and interest amounts based on the most recent principal balance (referencing queries above), and relevant data in tbl_Loans (InterestRate, and RecurringAmount).

So here's the problem: without the above queries referencing [Forms]![frm_Loans]![LoanID] the qdf runs, yet produces inaccurate numbers. With the above queries referencing [Forms]![frm_Loans]![LoanID], Access gives me a message "Too few parameters. Expected 1." If I take the qdf and put it into a standard query it runs just fine. I need this append query to be a qdf so it will loop until RecordsAffected = 0.

I've sterilized the data and attached the database. I was thinking this adjustment of adding the reference to [Forms]![frm_Loans]![LoanID] in the 2 above queries would work, but it seems like the qdf is not inheriting the parameter.

View 5 Replies View Related

Can Fields In Access Tables Be Referenced By Number?

Jun 4, 2012

Do fields in Access Tables have a 'Number' property that you can use to reference them?

For example, if you have the following fields:

EmpID
FName
LName
Department
Hire_Date

Is there a way to query an employee's Hire_Date by telling Access to return the value that is in the 5th field [Hire_Date]?

[URL] ....

View 8 Replies View Related

Rowsource Of Lookup Field Dependent On Field Value In Same Record In Subform

Jul 6, 2014

I want to create a different rowsource-query for a lookup field (field1) in each record in a subform. The rowsource changes dependent on the value in another field (field2) in the same record. How can this be done?

- I tried to change the rowsource-query in an eventmacro when the focus is set to field1, but this ofcourse changes the rowsource for all field1's and makes the allready selected values unvisible.
- I think I have to include the value of record 'field2' in the rowsource query, but i cannot find a way to include that value in the query.

Something like:

Lookup field1 in the subform contains this rowsource
- SELECT CUSTOMER.Id, CUSTOMER.AGE, CUSTOMER.NAME
FROM CUSTOMERS
WHERE (CUSTOMER.AGE= me![field2]);
me![field2] however does not function

View 5 Replies View Related

Access 2010 - Getting Form To Show Update Data To A Table When Two Tables Referenced

Jun 27, 2012

I have a form with two tables referenced. I am using the form only to update one of the tables. I am using the other table to pull a reference field. When I add my second table using the query builder, it makes it to where I can't edit/add in my form. I assume its because of the SQL insert statement, but I don't see this statement and can't find where it is to edit it. How to have the form only update one of the tables, while just using the second table as a reference for a field?

View 1 Replies View Related

Lookup 2 Field To Auto Fill Another Field?

Dec 30, 2012

Is it possible to look up 2 field to auto fill another field?

Field 1 is "Exposure" this autofill with "Probability" is user input.

I need to lookup Exposure and Probability and autofill a score in to "Risk Rating". This to stop incorrect data being inputted.

I have a table with all the results combination in it.

Would it be possible to use a Dlookup to look at Exposure and Probability to give me the score

I tried a Combox with autofill. But the power to be would like it done without user input.

View 11 Replies View Related

Lookup Field

Jan 11, 2008

Hi,

my only other issue!!! i have a lookup field on a table and when i view it in datasheet, i can see the actual lookup value i need however i have tried the following options:
create a form from the table
added a combo box to an existing form and gone through the wizard

both options show the id number and NOT the value i need to show. what can i do to show my actual information?

many thanks,

NS

View 8 Replies View Related

Using The Lookup Field...

May 3, 2005

Let's say that I have two tables:

Table Numbers:

ID VALUE
-- ------
1 123
2 456
3 789

Table Letters

ID VALUE NUM_LOOKUP
-- ------ -------------
1 ABC 1
2 DEF 3

Now, I'd like to use the lookup feature so that NUM_LOOKUP is a combo that displays the data in VALUE based on the relationship between ID in the two tables.

So, when you open the Letters table, you see the above. If you click in the NUM_LOOKUP field, you get a box that displays "123" for the first record and "789" for the second record.

I'm very close -- Here's what I have:

I tried the following:
Display Control: Combo Box
Row Source Type: Table/Query
Row Source: SELECT [ID],[VALUE] FROM [Numbers] AS [NUM_LOOKUP];
Bound Column: 1
Column Count: 2

Problem: This selects ALL values of ID from [Numbers].

I tried adding the following to my row source:
WHERE [Letters].[NUM_LOOKUP]=[Numbers].[ID]

This just gives me the "enter parameter" dialog box for [NUM_LOOKUP] and [ID].

Any help?

Thanks!

View 2 Replies View Related

Lookup Field

Jul 31, 2006

Alright, I have a field called metrics that looks up the text in another table caled Metric Name. I want to delete the table that is being used to supply the values, but I still want a listbox with all those names. Also I want to be able to add names to that listbox. I am not sure how to do this.

View 3 Replies View Related

Help With Lookup Field

Dec 11, 2006

Hi all,

It is along since i have used access for anything and I am having problmes getting it to do what i want it to do.

I have 2 tables one which hold the data needed and the other is being used to hold a list of products with prices.

In my main talbe in which the data will be entered into I have a drop down so the product can be selected, once it is selcted i want the next field filled in automaticaly with the price. The look up looks at my products table which hold the price too. I tried with setting the look up based on a query but it get errors about using the same table

Anyone help me???

Thankyou for looking

View 11 Replies View Related

Lookup Field

Sep 25, 2006

I would like to create a lookup for a field - I want to display 2 columns, but store only one in the table.

Id City
1 Sheboygan
2 Sheboygan Falls
3 Plymouth


Show both fields in the lookup, but only store the Id in the table.

I can't seem to get the second column to display.

View 5 Replies View Related

Lookup Field Value

Mar 13, 2007

I have two columns in the look up field. When I select the lookup value in the form I need value from one column to be displayed in one box and the value from the second column displayed in another box. Is there a simple way to do it?
Thanks

View 3 Replies View Related

Lookup For Value In A Field

Apr 30, 2013

I am working on a database where i have to show the user last modification date of the files they are getting the data from. I have already completed that process. Used GetDatetime to find the files last modification date and time. And now i am moving on to the next step and Here is the scenario.

User will click the IMPORT button and first, it will check the last modified date in the form of those files(which is an unbound textbox) and compare that date with the Date Column that exist in the tbl_Import. If the Date matches it will show them a message Saying "Data cannot be imported since it already exist. If it doesnt match it will run the macro i have created to run the data import process

View 1 Replies View Related

Restrict Lookup Field By Value Of Another Field

Mar 9, 2007

Hi gurus,

I have two fields in the main record table with values lookup from two other tables. These two table has 1-many mapping (like country - States). Can I make change within the record table. When I change the value in country field for a record, the States field will only show the states of that country?

Now I have lookup query for these fields from country and states seperately, so no matter what I change in the country field, the states field show all states for all countries.

Thanks for your advice!

View 4 Replies View Related

Lookup A Field Based On Another Field

Mar 15, 2006

Hi, I'm pretty new to access but almost have a database working the way I want it to. I just need help with one thing. I am using PPC Creations on a PDA to fill out a service docket. All the fields export to the DB ok, the problem I have is displaying the info on a report. I have one field to display one of 8 manufacturers and then 8 fields (one for each manufacturer) that display the model. A bit like this...

IntruderPanelType (results are code eg. 1=ADE 2=ADEMCO)
ADE (results are text eg. Optima)
ADMECO
DABOSCH
GARDTEC
MENVIER
SCANTRONIC
TEXECOM
OTHER
OtherIntruderPanelType

So, on my report I want a field (maybe needs to be new) that will display the contents of the relevant manufacturer field, depening on what is in the "IntruderPanelType" field. On the report if "IntruderPanelType" is "1" and "ADE" is "Optima", I want it to display.......

Control Panel Type: ADE Optima

I'm sorry if I'm not making myself clear but if you can understand my ramblings I'd really appreciate a simple solution to this. I've attached a copy of my database so far, in case it helps any! TIA for any help you can give.
Regards,
Brian

View 3 Replies View Related

Lookup Field Row Dependant

Mar 18, 2005

Hi Everyone,

I have a question about lookup fields. I have the tables below. The main table is [vid] and i reference other tables like [manufacturer], [model].. etc. to fill in [vid]. I have pull down lookups for all of [vid] but it is showing all models, makes, etc. I need helping making the lookup row dependant. For example when I am in [vid] and click on the [model] combo box for vid=1, I only want to see the models for that manufacturer(Ford), so it will only show mustang, escape, and navigator; not all of the models. For vid=2, when I click the pull down for model I only want to see Gm Models, corvette and cavalier. So this is what i mean be row dependant. Is this possible?

Thanks so much in advanced,
Michael

[vid]
vid,year,mft, make, model, submodel, ...
1,2005,ford,ford,Mustang,GT
2,2005,GM,Chevrolet,Cavalier, LS
3,2005,dcx,Jeep,Wrangler,base
...
30,2005,ford,Lincoln,Navigator, base

[manufacturer]
mid,mftName
1,ford
2,gm
3,dcx

[Model]
modelID,modelname,modelmft
1, Mustang,Ford
2, Escape, Ford
3, Corvette, GM
4, Cavalier, GM
5, Navigator, Ford
6, Wrangler, DCX

View 2 Replies View Related

Field & Lookup Table

Jan 6, 2006

I am very new to Access and any help would be appreciated. I have been through the entire Access Bible and many forums but can't find the answer to my specific question.

The project:

I'm setting up a database for tutors and students. Tutors will, via the web, enter data about a specific tutoring session (studentName, subject, sessionLength, etc.) Then at the end of the month a report will be generated detailing hours tutored and total compensation.

The problem:

Students pay varying rates based on subject (math or verbal). So in the Session table each record for each tutoring session has an empty field called payRate. This is the rate the student will pay based on subject. So I need this field to "fill in" automatically based on the 'student' and the 'subject' from the same record. Then I can multiply the field by sessionLength and get a totalPay field for the session. Add these at month's end and pay the tutors.

I've set up a lookup table called 'subject' with three fields (student,subject, payRate) and I have the student and subject combined as the primary key. Am I on the right track here? If so, how do I link the tables to get that Session 'payRate' field to fill in automatically. This is where is breaks down for me. I've tried the lookup wizard but all I seem to get when I open the Session table is an empty PayRate field with a drop down box containing the entire subject lookup table.

Sorry for being so long winded but I need help from someone better at his than me. Thanks in advance.

View 2 Replies View Related

Update A Lookup Field

Apr 20, 2006

I have a table (tblStudent) containing a field named fldTeacher1. Looking at the properties of fldTeacher1 I see that it has a lookup:

Bound Column: 1
Column Count: 2
Column Widths: 0";1" (id number; teacher's Name)

I am trying to run a DoCmd.RunSQL command in code and My question is how do I write a sql statement in code that updates that field with a new value?

I have tried:
DoCmd.RunSQL ("UPDATE tblStudent SET fldTeacher1 = " & Val(txtID) & " WHERE fldID = " & gintStudentID & ";")

All it does is place the id # in the field and not display the teacher's name in fldTeacher1 after the command was run.

View 2 Replies View Related

Field Lookup On Forms

Apr 17, 2005

I am a new Access (2003) user.

I am using one table (Table A) as a data source for a form, using the form to update and edit records. However, I wish to include a field on the form that uses an ID field in Table A to perform a lookup on Table B.

To explain further, I have a staff ID in Table A, and I want to look up and display, but not edit, the corresponding surname from Table B (just for display and convenience - we all recognise surnames rather than ID's).

Many thanks in advance

View 3 Replies View Related







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