Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

change same field in multiple queries

Status
Not open for further replies.

velveeta

Programmer
Sep 10, 2002
5
US
I currently have a unique ID# in a table, with many other queries and tables attached to it. When I change the unique ID I have to change it in about 10 different queries to make sure it updates all the necessary tables.

I want to enter some code or use a macro that, once I decide I am going to change the unique identified in the main table, will replace the id# field in each query with a replacment ID# (search for a ID#1 and replace with ID#2 in any of these 10 queries, only IF that ID#1 is present in the query). I can use code or a macro if possible.

 
Hi,

Format a dynamic SQL string
[code[
sql = "Select A.* From MyTable A Where A.ID='" & MyID & "' "
[/code]


Skip,
[sub]
[glasses] [red]Be advised:[/red] It's been reported that a wee psychic is roaming the countryside.
Small Medium @ Large! [tongue][/sub]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top