PC Review


Reply
Thread Tools Rate Thread

Createing look up field

 
 
Joker
Guest
Posts: n/a
 
      21st Jun 2006
I am converting an Excel workbook into an Access database. This first table
I created was an import of all the original data call it Sales Table. I
want a few of the columns to have a limited set of choices, so I created a
table called Region Table. I created a relationship from the Region Table
to the Region Field in the Sales table. However, when I try and create a
lookup table, it deletes the records of gives me an error indicating I am
putting in an unexpected value. If I go to the Sales Table and select from
the pull down menu, then it accepts the value. Since I have thousands of
lines of data, I don't want to go through each record and re-select the
correct region. Is there a faster or easier way to make this work? Did I
do something wrong on the import or creating the relationship?
--
Joker
"...God hath made me to laugh, so that all that hear will laugh with me."
Gen. 21:6


 
Reply With Quote
 
 
 
 
Jerry Porter
Guest
Posts: n/a
 
      21st Jun 2006
I don't understand what you mean by "when I try and create a lookup
table...".
Your Region Table is the lookup table.

If you have created a key field in Regions that you want to use in
Sales instead of the text value of the region, then you can do this
with an update query as follows:

1. Create a RegionID field in sales that is the same data type as the
key field in Regions. I think you've already done this.

2. Create an update query that links the two tables on the Region text
fields.

3. In the Update row, in the column for the Region ID in the Sales
table, enter Regions.RegionID (or whatever you have for the table name
and key field name.)

4. After running the query and verifying the region assignments, you
can delete the region text field from the Sales table.

Jerry



Joker nospam wrote:
> I am converting an Excel workbook into an Access database. This first table
> I created was an import of all the original data call it Sales Table. I
> want a few of the columns to have a limited set of choices, so I created a
> table called Region Table. I created a relationship from the Region Table
> to the Region Field in the Sales table. However, when I try and create a
> lookup table, it deletes the records of gives me an error indicating I am
> putting in an unexpected value. If I go to the Sales Table and select from
> the pull down menu, then it accepts the value. Since I have thousands of
> lines of data, I don't want to go through each record and re-select the
> correct region. Is there a faster or easier way to make this work? Did I
> do something wrong on the import or creating the relationship?
> --
> Joker
> "...God hath made me to laugh, so that all that hear will laugh with me."
> Gen. 21:6


 
Reply With Quote
 
Larry Linson
Guest
Posts: n/a
 
      21st Jun 2006
"Joker" wrote

> . . . However, when I try and create a
> lookup table, it deletes the records
> of gives me an error indicating I am
> putting in an unexpected value. . . .


If you mean "when I try and create a Lookup Field," just don't do that. You
already have your lookup Table, you can join the Tables in a Query and
display the text instead of the ID, it works nicely with the Combo Box, and
there's no question what data you have in which table.

Lookup Fields, on the other hand, are a violation of relational design
principles -- they obscure what is actually stored in the Table by
displaying something else in Table View, and they can be a real pain when
you do Queries.

Larry Linson
Microsoft Access MVP



 
Reply With Quote
 
Jerry Porter
Guest
Posts: n/a
 
      21st Jun 2006
If you mean that your creating an autolookup query, then make sure that
the region id field is coming from the Sales table, not the Regions
table. It should select from the codes in the Regions table, and assign
that select to the record in the Sales table.

 
Reply With Quote
 
Joker
Guest
Posts: n/a
 
      22nd Jun 2006
>I am converting an Excel workbook into an Access database. This first
table
>I created was an import of all the original data call it Sales Table. I
>want a few of the columns to have a limited set of choices, so I created a
>table called Region Table. I created a relationship from the Region Table
>to the Region Field in the Sales table. However, when I try and create a
>lookup table, it deletes the records of gives me an error indicating I am
>putting in an unexpected value. If I go to the Sales Table and select from
>the pull down menu, then it accepts the value. Since I have thousands of
>lines of data, I don't want to go through each record and re-select the
>correct region. Is there a faster or easier way to make this work? Did I
>do something wrong on the import or creating the relationship?


I had imported the data and let Access assign the ID, which was unnecessary.
I have corrected the primary key to be the actual data in the file. I had a
copy of the raw data and just copy/pasted the information back in once I had
the relationships established. If you could not tell, I am rather new to
this.

--
Joker
"...God hath made me to laugh, so that all that hear will laugh with me."
Gen. 21:6


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Createing new files marc@idev.ch Microsoft C# .NET 1 23rd Oct 2006 08:15 AM
createing a list =?Utf-8?B?SG90IHJvZA==?= Microsoft Excel Misc 2 5th Apr 2006 08:56 PM
Createing Yes No Msg boxes. =?Utf-8?B?QWNjZXNzIHRvIEFjY2Vzcw==?= Microsoft Access 2 13th Mar 2006 03:55 PM
Createing an ISO for a recovery CD Tommy Windows XP Embedded 1 7th Oct 2005 03:35 PM
Createing OU's Brian Henry Microsoft Windows 2000 Active Directory 1 22nd Jul 2003 02:10 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:44 AM.