Tables :: Replacing Existing Field By Lookup Value

Feb 23, 2013

I'm building a database to calculate yearly fees for customers. I have a list coming from our accountancy-database that shows a field with the clients name & surname combined and I have a table named 'customers' that contains the clients names & surnames as separate values.

The first table (let's name it "accountancy") thus contains a field "Customer". Example data in this field:

"John McLane"
"John Doe"
"Marcy Free"
"Zino Withers"

The second table ("customers") contains the fields "ID, name, surname". Example data in this table:

1;"John";"Doe"
2;"Marcy";"Free"
3;"John";"McLane"

Now, what I'm looking for is a way to replace the 'Customer'-field in the first table by a lookup field that contains the correct ID for that customer in the 'Customers'-table.

Lucky thing: there are no doubles in the customer's table, so no two customers have the same name AND surname.

View Replies


ADVERTISEMENT

Using Append Query - Update A Table By Replacing All Existing Information

Dec 6, 2013

Can I use the append query to update a table by replacing all existing information with updated information while at the same time adding all data that isn't currently in the table?

Right now every time I run the Append Query it just adds the same information as a new row instead of replacing the existing row with the updated information.

View 8 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

Tables :: Add Existing Field From One Table To Another

Apr 8, 2013

I am trying to add an existing field from one table into another table but the table Im currently in shows that option to be greyed out. What would cause that option to be greyed out?

View 2 Replies View Related

Tables :: Add Existing Field To Local Table Within Same Database

Oct 31, 2013

Adding a field in Access 2007.

I am adding a exisiting field which is already available on a Global Table and would like to add it on a local table within the same database. Also bearing in mind the db contains main objects - Tables/Queries/Sharepoint lists/forms/reports

Whats the process in doing this? Once added how does the data get populated?

View 1 Replies View Related

Tables :: Added New Field With Default Value Of Zero - How To Update Existing Records

Oct 3, 2012

I have an existing table that has calculations. When I added a new field with an default value of zero, it did not populate the existing records. Now my tables are not calculating. How can I update the existing records with the new default of zero.

View 2 Replies View Related

Tables :: Migrating OLE File To Attachment Field In Existing Record

Mar 8, 2015

Exporting all the OLE files in a 2003 database.

Any way to automatically connect these file to an attachment field in the existing record.

View 7 Replies View Related

Add New Field To Existing Table And Populate New Field With Existing Data

Apr 23, 2014

-Microsoft Access 2010

-Existing Access Database contains tables with 1-2 million records

I would like to add a field[dol] to an existing table[rei]. I need this new field[rei].[dol] to be populated with existing data from another table[main] based on the associated field[main].[account1] or [main].[account2] or [main].[account3].

Table1[main]
...account1
...account2
...account3
...dol

[code]...

In the [main] table. There is always data in [dol]. But there is NOT always data in the [account] fields. Sometimes there is multiple account numbers per [dol] but not always.

Customers will ALWAYS have at least 1 [account] number and [dol]. Some will have multiple [account] numbers and [dol]. Sometimes these [account] numbers are the same in multiple fields[account1] [account2] [account3].I just need to do a lookup or something to find the [account#] and pull in its [dol] from the [main] table and populate it in [rei].[dol].

View 14 Replies View Related

Lookup Values In Existing Database

Dec 13, 2007

I've been racking my brain the last couple of days trying to figure out how to solve this problem, and I believe I've reached the end of my rope. I have a feeling that this isn't very difficult to a more savvy Access person, but I am at a loss.

Here's the situation. I have received a fairly large DB containing CCTV data for sanitary sewers. There are primarily two tables I'm dealing with, one lists a number (auto-number) for each pipe that was televised. Simple enough. The other uses this legacy number to show all deformities or service leads within a particular length of pipe. For example, for run X, there may be 7 rows in the table with X as the ID, one for each service lead along that length of pipe (I hope this is making sense :()

Ultimately, we need to tie this database into our GIS theme. To do this, I will need to add to the PipeID number from our GIS theme to the access table. What I've done so far is to create a new table in the DB with the number for each pipe televised, and I've manually added the corresponding PipeID number from the GIS in the second column. What I'm hoping to do is add a new column to my occurrence table so that for each occurrence X, I can add the GIS PipeID number. Perhaps this would make more sense:

Run # PipeID
1 S143
1 S143
1 S143
1 S143
2 S231
2 S231
2 S231
2 S231
3 S543
3 S543
3 S543

I've gone ahead and created the relationship between the newly created table and the existing table based on that auto-number field, and I've made the new PipeID column a combo box. This shows all of my PipeID numbers, which is a good thing. I'm hoping there's a way for it to automatically recognize the auto-number field and populate the PipeID field accordingly.

Have you ever known what you want to say, but not quite understood how to say it? That's kind of how I feel about this question, and I do apologize if I've made no sense. But if I have, and anyone has any suggestions for me, they would be greatly appreciated.

Cheers,

Azimuth

View 3 Replies View Related

Tables :: Import To A Lookup Field

Dec 1, 2012

I am building a horse racing based database, two of my tables being Courses (details of each track) and Races (Type of race, where run, prize money etc). In my Courses table I have CourseID (autonumber, key) and CourseName (text, max 25). The longest name in the list is 19 characters.

In my Races table, I have CourseID set up as a lookup, related to CourseName in the Courses table. This works fine if I type the CourseName in manually, or select it from the drop-down list.

My problem arises when I import it via excel, when the whole CourseID column is deleted, as not the correct data type. I have tried formatting the CourseID column in excel as text, general, and even number prior ti importing, all to no avail. How should I format this column in excel?

View 4 Replies View Related

Tables :: Lookup By Year In Date Field

May 30, 2013

I have a date field that is just a typical date field. When I do a query, I want to look up by just the YEAR in that date field. Can I do that or do i need a separate text field with JUST the year entered in? or can i have a field in my table that just looks up the main date field and displays/uses ONLY the year??

View 3 Replies View Related

Tables :: Creating A Field With Lookup Wizard

Jan 27, 2014

I'm trying to create a field with the lookup wizard, however it's a bit more complicated. I need the field to have multiple choices(3) and when a specific option is selected I need some additional choices to appear. For example: Question - have you ever used a specific product. Options: a-yes, b -no, c-other. If option b is selected then thats it, but if option a is selected I need a few other options to appear: was the brand Option1 or Option2? Also did you use it before(option1) or after(option2) smth.

View 2 Replies View Related

Tables :: Using MultiValue Field Without Making It Lookup

Apr 14, 2014

I've been doing some reading on multivalue fields and it seems to be exactly what I'm looking for. My question: Is there a way to use the multivalue field without making it a lookup? I need the user to be able to put multiple values in a field but can't limit them to a list. The field that needs multiple values happens to be for SKU numbers from a large department store franchise.

One work around I've come up with is to have a pop up that asks for the separate sku numbers so they can be used for the value list each time, but then the user also would have to select those from the value list in order to enter it.... too many end user steps.

I want to avoid making 10-15 different fields each for SKU number, Item, and cost... I also need to avoid having to populate my db with the department store's full list of products...

View 5 Replies View Related

Tables :: Sorting Table Field With Lookup

Aug 12, 2015

I have created a lookup in a field in a table:

select id, bike from tblbikes.
Column count 2
Width 0,3

When I try to sort the table by bike:

I receive the following error: Type mismatch in expression.

Is there some way to sort a field with a lookup.

View 3 Replies View Related

Tables :: Default Value As Lookup Depending On Another Field

Feb 26, 2013

I have have a "master table" with Analyst ID and Analyst fields among other fields needed. Analyst ID is a number and Analyst will be the name of someone that corresponds to that number. I have a separate table that defines who is assigned to that particular ID.

1 Kim
2 Sarah
3 Beth

I have a form for this master table that shows Analyst ID and Analyst. I would like the default value of the Analyst field to be the name that corresponds to the Analyst ID number for the record. I would also like this same field to be a drop down on the form so that my users can change it as necessary. IE. If the record shows Analyst ID =1, the value for Analyst will show "Kim" unless changed to another analyst manually per the drop down.

View 3 Replies View Related

Tables :: Lookup Fields Referencing Another Field

Apr 2, 2015

I created tables that have lookup fields referencing another field. Actually I have several tables that all have relationships and object dependencies in my database. Now that I am trying to create some different reports, when I run the report I get the ID rather than the contents of the field. Also, I have a 'Report Dashboard' so to speak that I can run different reports from. On the form I have Combo boxes that reference one of the tables. I can generate the report showing the information, however I tried using a text box (criteria)(=[Forms]![Reports Form]![Combo47]+" County") in the header of the report to reference the selection made in the form combo box. When I run the report I generate the ID in the header.how do I get rid of the lookup fields in the tables, or is there another work around?

View 5 Replies View Related

Tables :: Replacing 100% Of Table Content

Jul 1, 2014

I have a table (which has a few relationships) that contains 10.000 records up-to-date, but I've been making major changes to my database working on an old version from early June, when it had +9000 records.

What I'm planning to do to update the table:

export those 10.000 (up to date) records to a Excel file
delete those outdated +9000 records manually (select all + supr)
import the data from the Excel file so my new database is up-to-date again .

Is this acceptable or could lead to weird errors in the future?

View 2 Replies View Related

Tables :: Deleting And Replacing A Linked Table?

Mar 5, 2014

My table (excel spreadsheet) sits on another directory from the DB. If I delete the table on this directory and immediately replace it with a table with the same filename, format, etc (only the data has changed) will each database user have to relink the table on their desktop DB? Or will the forms/subforms/reports still maintain their relationships/functions and just display the new data?

View 2 Replies View Related

Tables :: Select Table Lookup And Auto Fill In Another Field

Apr 10, 2014

i have a user permission table.that consists of PermissionPK, UserFK, CompanyFK. I also want the username to be automatically filled in?So when a user ID is filled in on the table, it also fills in what that UserID's Username should be?As i need both the UserId and Username text for code that looks at the Environ username.

View 2 Replies View Related

Tables :: Split Database - Table Field To Lookup Values From A Query?

Jul 6, 2015

I have a split database and need a field (Combo type) in the table to lookup values from a query in the front end. How do I do this as it doesn't see the querys because the front and back end are split?

View 3 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

Replacing Date Field After Updating Different Field?

Mar 11, 2014

I can't seem to get my date field to update to today when I add information to another field.

My table has a lookup field, date field, text field, text field, text field.

I have set the date field to default to today for each new record.

I work with this table as a subform.

I would like to have the date field update to the date I go back to the record and update the first text field.

I have tried using after update, and an if - then statement, but nothing seems to work.

View 10 Replies View Related

Replacing The Numeric Values Of A Field In Querry

Apr 25, 2007

Hi

I am trying to replace the numeric values of a field with a text in querry using Choose function, something like this aa5:

Choose([a5]-1="one";[a5]-2="two";[a5]-3="three";[a5]-4="four")

But it is not giving me no results :(( I am missing something but I do not what. Maybe I should use some other function?

I hope someone will help me!

View 1 Replies View Related

Replacing Running Total From Subforms Control To Main Form Table Field

Jun 11, 2015

I have an access form (Customer) along with a sub-form (Work_done). On sub-form I have Running sum of Amount in Text box-1. I want that Total of Running sum be replaced with Main form's tables field total_amount. Is it possible that we can replace an amount of control of sub-form into main form's field?

View 1 Replies View Related

Tables :: Joined Two Tables - Unable To Filter / Lookup On Second Table?

Feb 18, 2013

I have an Access Table with about 28,000 Automobile dealerships across the country shown. I've joined a new/small phone contact table to this to keep up with our phone contacts with the dealership and followup efforts. When I search/filter on the dealership table all is fine. However when I search/filter on the phone contact table with a few test entries, I get nothing at all. I supposed that after joining the tables, I'd be able to do a search on the field named follow up date and find/filter today's date or other dates and locate which dealerships to contact when the correct date arrives. But nothing.

View 14 Replies View Related

Tables :: How To Check Pre-Existing Tables

Nov 10, 2014

I am very new to Access and Visual Basics. I am trying to write a VBA code to do the following."If any table(s) exists in the current db, drop all the table(s)."

Basically, I am trying to drop all existing tables.

View 3 Replies View Related







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