In code you can try something like:
CurrentDb.QueryDefs("NameOfQuery").SQL = _
Replace(CurrentDb.QueryDefs("NameOfQuery").SQL, "OldTableName",
"NewTableName")
Manually, you can open the query in Design view, switch to SQL view then
change the name. Unfortunately, Access doesn't have any editing tools when
working with SQL: you might find it best to copy into Notepad, make the
change, then copy back into the query.