Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

How update part of a text string in a table based on a change to a text string in another table?

Posted on 2014-03-11
6
Medium Priority
?
283 Views
Last Modified: 2014-03-13
I hope I can explain this one well enough for someone to understand.

I have two tables.  Each table has a text field.  For example, table #1, named tblImages has a text field and in one record that text field may say "Blue Ribbon".

Then there may be one or more records in the 2nd table named tblProducts".  and in this field for example one record may say "Blue Ribbon, 2" wide, 48" long".  And another record may say "Blue Ribbon, 3" wide, 42" long".

If the user has changed the text in table #1 to, for example, "Old Blue Ribbon", then I want the records in table #2 to read...  "Old Blue Ribbon, 2" wide, 48" long" and the other record to read "OldBlue Ribbon, 3" wide, 42" long".

Is there any way to do this?









"Blue Ribbon, 2" wide, 48" long".
0
Comment
Question by:SteveL13
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 6

Expert Comment

by:c1nmo
ID: 39922192
You could use two tables and present the result in a query, see attached screenshot.  When  mainvalue is updated in tablea, the query automatically reflects the change.
joined.png
0
 
LVL 19

Expert Comment

by:regmigrant
ID: 39922202
if the text part of the name is transferable in such a direct way you would be better re-designing your tables so that one contains the text description and the other is related using an ID. In your forms you would then pick up the appropriate text from the table based on the foreign key. In this was you only store the text once and its always automatically updated.

Doing it the way you describe is leaving yourself open to a world of pain and corrupt data - for example: what if you have Blue Ribbon, Red White and Blue Ribbon, striped Blue Ribbon etc etc. - changing Blue Ribbon in any of those to Old Ribbon would presumably be wrong
0
 
LVL 46

Accepted Solution

by:
aikimark earned 2000 total points
ID: 39922653
if the text ("Blue Ribbon, 2" wide, 48" long") was a result of a query, then you should be able to construct the text to use a name field the user might change and an item dimension field that the user can not change.
0
Get your Conversational Ransomware Defense e‑book

This e-book gives you an insight into the ransomware threat and reviews the fundamentals of top-notch ransomware preparedness and recovery. To help you protect yourself and your organization. The initial infection may be inevitable, so the best protection is to be fully prepared.

 

Author Comment

by:SteveL13
ID: 39923298
To c1nmo:

I'm not sure I understand.  Are tablea and table b temporary tables?  Or?  And if so how did you create them in the query designer?
0
 
LVL 6

Expert Comment

by:c1nmo
ID: 39924164
No, just standard tables created in the usual way then added to query designer so they could be joined.
0
 

Author Closing Comment

by:SteveL13
ID: 39927035
You are correct.  This whole idea is too risky.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes two methods for creating a combo box that can be used to add new items to the row source -- one for simple lookup tables, and one for a more complex row source where the new item needs data for several fields.
The Windows Phone Theme Colours is a tight, powerful, and well balanced palette. This tiny Access application makes it a snap to select and pick a value. And it doubles as an intro to implementing WithEvents, one of Access' hidden gems.
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

604 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question