Lookup And Update Data????HELP

Feb 24, 2007

i want to update data fields (time fields) in a table based on a number input by user (so it will search for record in table using the number and then update the relevant fields)....How can i do this am quiete confused there PLEASE DO HELP

View Replies


ADVERTISEMENT

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

Update A Lookup Feild

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 1 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

Recursive Lookup And Update In Access- HELP!

Jun 15, 2007

Hi, I have a very simple database with 2 tables:

table: animals

1. Cat NA
2. Dog NA
3. Rat NA
4. Bat NA
5. Garfield NA

table: felines
1. Cat
2. Garfield
3. Simba

what I want to do is:

UPDATE animals.field3 (which starts off as NA's) to "meow" if animals.field2 matches any item in felines.field2.

it is a recursive operation and I'm not sure how to do it

here is what the animals table should look like if the UPDATE query runs as it should


1. Cat Meow
2. Dog NA
3. Rat NA
4. Bat NA
5. Garfield Meow

Any help would be great! I prefer SQL view of the UPDATE query if anyone knows how to do this. Note: I like cats and dogs equally, this is just to learn how to do such an update.

Sasi

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

Forms :: Dynamically Selecting A Lookup Table To Update

Apr 7, 2014

I have several lookup tables in an Access database. These tables are used to populate fields in the main table and act as filters for viewing record subsets.I want to create a form that does the following:

1.) List the lookup table via a combobox.I was able to accomplish this with the following code:

Code:
SELECT MSysObjects.Name AS [Table Name]
FROM MSysObjects
WHERE (((MSysObjects.Name) Like "tblJob*") AND ((MSysObjects.Type)=1) AND ((MSysObjects.Flags)=0))
ORDER BY MSysObjects.Name;

2.) When a table is selected from the combobox, display the table in a subform for updating.

View 7 Replies View Related

Database Update Of Multiple Fields Based In Lookup

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

Update Query To Increment Value In Lookup Field On All Records?

Sep 1, 2012

Is it possible to run an update query to increment the value in a lookup field on all records, if the values are not numerical?

For example if the look up field contains Unit A, Unit B etc? can a query be executed so that anything with Unit A will be set to Unit B, and Unit B records will be set to Unit C?

View 5 Replies View Related

Lookup Data In Another Query

Sep 14, 2006

Hi Folks
I have a form that is based on a query.
I want to change the unique ID that is displayed on this form.
The new ID is sourced from a different query. I.E. Not the same query that the form derives its information.

I have set the data source property of the field (Combo1) to the "other" query.

How do I get the Combo1 to update to the value of the first record?
Currently its defaulting to Null.

I have tried using :
Me.Combo1.Requery - This does NOTHING to the vaue.
Me.Combo1.MoveNext - I keep getting a "Method or data members not found" error.

View 7 Replies View Related

General :: Saving Data - Update Or Cancel Update Without AddNew Or Edit

Apr 13, 2013

My membership database has worked fine until recently. Now I cannot save inserted data. On attempted saving "Update or CancelUpdate without AddNew or Edit" appears.

The problem. relates to 2 tables Member and Addresses. PK in the parent table Member is ID. In the Addresses Table the FK is ID. There is a One to One relation between the tables and Referential Integrity is set. I know 1 to 1 is not good but it worked fine in this small database.

Browsing the all of the existing records is fine.

View 9 Replies View Related

Data Type With Lookup Wizard

Nov 1, 2004

Heres something I dont understand about the lookup wizard:

Ive done a lookup wizard on one of my fields, so that now the user gets a drop down list of options to choose from:

0;1;2;3;4;5;6;7;8;"NTSC";"PAL"

Ive also set "Limit to list" to yes, so that these are the only options the user can enter.

However, it will still let me change and play around with the data type settings under the general tab. I dont understand why it lets me do this. I can set the lookup to the above list, and then specify a date type of type "date", and it will allow me to do it.

Why is this the case? Which datatype should I set it to, if I have a list of values like the one above?

View 1 Replies View Related

Dsplay Lookup Data In Form

Sep 21, 2005

This is going to sound really stupid but I urgently need to have one form, where people can enter a product code and the description automatically shows in another field.

I have two tables, one for the form and another with all product codes and descriptions.

Presumaby I would need to make a query, which i've tried and failed miserably.

it seems so simple when you read the access help but i've missed something fundamental.

HELP!

Thank you.

PS I should have said my boss expects to enter data in one field - the product code - and the description automatically and instantly pops up in another field on the same form before leaving that particular record.

View 3 Replies View Related

Access Lookup Data Macro

Nov 16, 2011

I am trying replicate the northwind web database macro called getproductname getproductlist which is on the products table. this macro has a simple lookup action which looks up a record by a parameter being sent.

the customer order form has a productid combo box. on its after update it finds the product list. this UI macro just passess the product id to the data macro on the table and looks up the price for that id. then sets the value on the form. simple right? however i consistently get an error from the data macro on the table which says the "the identifier (enter field name here) could not be found"

in my case im selecting id and productname from my table. the syntax is correct. but when i run the macro i get "the identifier productname could not be found. ive been struggling with this for hours. and im using a working sample as an example.

View 2 Replies View Related

Access Massive Data Lookup

Sep 16, 2014

I have created a database with a list of product codes, pricing, costs, and supplier name. Now I have about 100 product codes which I would like to look up for all those information. Is there an effective way to do it in Access? I know I could export the whole datasheet to Excel to do a vLookup, but it may be lots of waiting time if the data are massive.

View 2 Replies View Related

How To Use Lookup In Project Data Table

Oct 8, 2013

I'm making a database to track projects/opportunities. I have a Project Data table, a customer table, and a contact table. A customer can have multiple contacts. I have already figured out how to use a lookup in the Project Data table to be able to select a customer for the project but how do I then select a contact based on that customer? I want to be able to assign a "main contact" in the project data table based on the customer that is selected.how to use the customer selected in the project data table to provide only the contacts for that customer to be selected from a combo box in the project data table.

View 2 Replies View Related

Table Lookup And Auto Insert Data

Nov 24, 2007

Hi All
I am new to this, hope you can help!!

I have 2 tables,
Customers and Routes
I want to auto insert data from Routes when I select the route Number from Customers,

the tables to auto update are
CruiseNumber:
CruiseName:
CruiseDate:

from
RouteNumber:
RouteName:
RouteDate:

I have read HELP in Access but I am a layman when it comes jargon. 'from the many to the few'??
Hope you can help....in 'Plain English'

View 6 Replies View Related

How Do I Lookup Something From A A Different Table On A Data Entry Form?

Aug 23, 2006

Okay, for simplicity's sake, I have a data entry form.

It is bound to tableData.

Inputs are:

ProductID
Customer Name


ProductID is a combo box.

There is another table called tableProduct. In this table, is ProductID and ProductName.

For convenience sake, when a user chooses a ProductID from the combo box, I want it to lookup that ID from tableProduct. However, how can I do this when everything is already bound to tableData?

Thanks in advance.

View 1 Replies View Related

How Do I Lookup Something From A A Different Table On A Data Entry Form?

Aug 23, 2006

Okay, for simplicity's sake, I have a data entry form.

It is bound to tableData.

Inputs are:

ProductID
Customer Name


ProductID is a combo box on the form.

There is another table called tableProduct. In this table, is ProductID and ProductName.

For convenience sake, when a user chooses a ProductID from the combo box, I want a separate textbox to lookup that ID from tableProduct and display the ProductName.

How can I accomplish this?

Thanks in advance.

View 2 Replies View Related

Tables :: Populate Lookup Table With Data?

Nov 22, 2013

I have problems understanding lookup tables, especially how to populate them with data. I'm working on an exams database, and have many such tables...

Table for Students
Table for Subjects
and a lookuptable for studentsubjects

Table for Classes 1, 2, 3, 4
Table for Subjects Eng, Math, Geo, Chem... 11 subjects in all
and a lookuptable SubjectClasses

Having inserted data for all subjects and all classes, should I then go ahead and Insert data for SubjectClasses? There will be 44 items!

Even more appalling, studentsubjects table will have (no of students * 11) for my small school, it will be 1,760

View 8 Replies View Related

Tables :: Getting Rid Of Lookup Fields Without Losing Data

Oct 15, 2012

What is the best way to do this without losing data? I have several FK that I made the mistake of setting up as lookup fields. I now want to correct this without losing data if possible.

DataType currently says "Number" under each of these. So I can't just change them to number. Is there another way to do this?

View 2 Replies View Related

General :: Lookup Data Type In Access 2013 Web App?

Jan 2, 2014

I want to create a Web App in Access 2013 that contains a table of client names, addresses etc, and a second table that contains order details, including client name. It would be nice to ensure that as someone adds a new order they are give a drop down menu containing existing client names, and I can see how you can do this for a brand new table using the lookup data type. But I already have an Excel spread sheet containing client names. If I import this into my Access web app to create the client table, and import the existing orders to create the order table, I then try and change the data type of the client name (in the order table) from short text to lookup, it won't let me!! (If I create an empty client table from scratch, it lets me define the company name as a lookup data type - but I can't then import from Excel into this empty table)

View 14 Replies View Related

Tables :: Possible To Automatically Lookup Data In A Table Without A Query?

Jun 18, 2013

A field in a table can be populated by a lookup up but it has to be done manually or with a form.A "new" table can be created with a query that matches the data.

Is it possible to skip these steps and create a field that automatically populates with the data from another table based on other common data?I can do this in Excel but not sure it can be done in Access.

View 1 Replies View Related

Tables :: Lookup Queries For Data Entry - One Table To Another

Oct 8, 2014

I am creating a table for data entry. Three fields in the table are going to be Firstname, Lastname, and Address. I want the choices for data entry to be read from a master table which contains first and last names and town of residence.

That being said I would like the choice of Lastname to be all last names from the master table, and the choices of Firstname to be those from the master table but are limited to having the Lastname as entered in the previous field, finally I want the Address field to be limited to those records which match the lastname and firstname. I have been playing around with lookup queries for each of the fields to no avail.

View 1 Replies View Related

Tables :: How To Switch Lookup Table To New One And Preserve Old Data

Oct 17, 2013

We have a lookup table that has a list of CLIN numbers and their costs. The contract that governs those CLIN numbers and costs will be changing to entirely new numbers. Unfortunately, I still need to have the old and new CLIN numbers linked to the other tables.

Will I need to merge all the CLIN numbers into one lookup table, or can I do it from two lookup tables?

View 5 Replies View Related

Manipulate Data By Changing One Of Columns To Lookup Field

Aug 16, 2011

manipulate the data by changing one of the columns (Customer 1) to a Look Up Field. This has created two challenges for myself:

1) The data is gone ... oops. I can solve this one.

2) More serious, that column (Customer 1) will only display primary key numbers of the data. Before the corruption, I had a combo box on a form. This combo box took its values from a Table called CustomerTable, the value in this combo box was stored in the QuoteListTable. Before it showed names, now only primary key.

I have attempted to:
-change the look-up back to a regular field (got rid of the look-up)
-exported the table to a query, turned it back into a table, no change.

View 1 Replies View Related







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