<>根据andymark版主的指点,我是这样弄的:</P>
<>rivate Sub Replac() <br>Dim tmpQuery As Object <br>Dim strQuery As String <br>Dim AQueryDef As QueryDef <br><br><br>For Each tmpQuery In CurrentData.AllQueries <br> If Not tmpQuery.name Like "MSys*" Then <br> strQuery = tmpQuery.name <br> Set AQueryDef = CurrentDb.QueryDefs(strQuery) <br> strsql = Replace(AQueryDef.SQL, "客户", "cust") <br> AQueryDef.SQL = strsql <br> End If <br>Next tmpQuery </P>
<P>.......................................<br><br>For Each tmpQuery In CurrentData.AllQueries <br> If Not tmpQuery.name Like "MSys*" Then <br> strQuery = tmpQuery.name <br> Set AQueryDef = CurrentDb.QueryDefs(strQuery) <br> strsql = Replace(AQueryDef.SQL, "cust客户名称", "custname") <br> AQueryDef.SQL = strsql <br> End If <br>Next tmpQuery <br><br>End Sub <br></P>
[此贴子已经被作者于2007-7-10 14:09:19编辑过]
|