Only if you have directly linked a query. (david) "Brian" <s@y> wrote in message news:efx5TS%238HHA.3400@TK2MSFTNGP03.phx.gbl... > David, > Why would I have to refresh the querydef? > When I change the source of my tables I have never needed to refresh the > querydefs for my queries (based on tables) to work. It also would not > explain why the subreport works when I relink using system or userDSNs > instead of DSN-less. > Thanks > Brian Morris > > <david@epsomdotcomdotau> wrote in message > news:OQt43DU8HHA.1900@TK2MSFTNGP02.phx.gbl... > > If I understand correctly, you have a query linked to a view? > > > > And you have refreshed your table links, but not refreshed > > your querydef? > > > > The linked table manager only manages linked tables. > > > > Most sample table re-link code only re-links tables, but it is > > not hard to add a querydef loop to the tabledef loop. > > > > (david) > > > > > > "Brian" <s@y> wrote in message > > news:%23qc1sND8HHA.4712@TK2MSFTNGP04.phx.gbl... > >> Hi, > >> (This message was posted in another group before I found this one.) > >> > >> I have a strange issue where the subreport of a report just does not show > > up > >> after my app does a relinking. > >> > >> What I do is that the app checks a UDL file to see if the name of the > > server > >> changed since last it was run and if it did it recreate the links by > >> deleting the linked table and recreating it with a connect string like > >> .Connect = "ODBC;DRIVER={sql server};DATABASE=" & strDatabaseName & > >> ";SERVER=" & strServerName & ";Uid=UserName;Pwd=password;APP=CUMME" > >> > >> For linking to views I also recreate the unique index. > >> > >> For this one report, the whole report is based on one view and the sub > >> report is based on a query which uses the same view. When I first > > manually > >> linked to the view the report worked fine. > >> > >> If I change the UDL to point to a different server, and let the app > > relink, > >> the main report comes up but the sub report section is blank. Once or > > twice > >> I even got ODBC call failed. > >> If I open the subreport by itself it shows with data. > >> If I open the mainreport without the subreport it shows with data. > >> If I open mainreport with the subreport only the mainreport shows up. > >> If I open the linked view in access I see all the data. > >> > >> If I change the UDL to point to original server and let the app relink > >> you > >> get the same weird behaviour. > >> > >> If I manually use relink table wizard to just refresh the link it still > > does > >> not work. > >> > >> If I manually delete the link then use link table to link to the view the > >> report works fine. > >> > >> I have then found that if instead of using a file dsn instead of a system > >> dsn I get the same problem so I am thinking that the syntax of the system > >> dsn has some info that the file dsn does not? > >> > >> Any ideas would be very much appreciated. > >> > >> Thanks > >> Brian Morris > >> > >> > >> > > > > > >