Connecting Tech Pros Worldwide Forums | Help | Site Map

Complex Access Lookup Table Help

Member
 
Join Date: Feb 2007
Posts: 121
#1: Feb 22 '07
I am trying to see is there is a way to lookup and update a field based on matching part of the contents of a field to a lookup table.

Example.

I have an "Error Description" field. And it adds codes to the field based on some queries.

So the field would look like: ACC-1, ACC-3, EXP-1

I want to know if I can change those codes to actual descriptions based on a lookup table.

So it would look like this: Missing Date, Missing Description, Invalid Cost

Or do lookup tables only work in matching the entire field contents.


Thanks

maxamis4's Avatar
Expert
 
Join Date: Jan 2007
Location: Northern VA
Posts: 214
#2: Feb 22 '07

re: Complex Access Lookup Table Help


Have you tried using a like query. These seem to work very well for boolean logic. Like Examples Scroll towards the buttom to see the examples of like queries. Also please display the query you have now in order to be helped a little more.

thanks
Member
 
Join Date: Feb 2007
Posts: 121
#3: Feb 27 '07

re: Complex Access Lookup Table Help


Thanks for the help.

I'm not sure how the Like Statement would work. I get how it would help me to find the records that have a certain error code. But, I'm confused on how I would use it to update the contents of the field for each code match. Also, I'm not sure how I would use it to lookup the description in my lookup table.

Thanks in advance for anymore help.

Here is the current query I have, but it is only designed to match the entire contents of one field to the other in the Lookup table:

UPDATE [Error-Description LU] INNER JOIN [DLU-Input Table] ON [Error-Description LU].[Error-Code] = [DLU-Input Table].[Error-Code] SET [DLU-Input Table].[Error-Code] = [Error-Description LU].[Error-Description];


Thanks,
Reply