lcQPR = FileToStr("MyQuery.QPR") lcQPR = strtran(lcQPR, "MyTable.", "") && removes all the <b>MyTable.</b> strings ** of course you would have to figure out what tables were used ** you can use the AT() function to look for the periods lnRetVal = StrToFile(lcQPR, "MyQuery.QPR") if lnRetVal > 0 *** successful else *** not successful endifI am afraid there are not many options for you on this.