Skip to Content
Former Member
Nov 13, 2007 at 12:30 AM

queries sporadically not refreshing when run in workbook


Hi All,

I have the following problem. I have a workbook that has two queries, one on each tab.

The specific thing I notice that the company code is not showing up in the query at first and I believe is what causes other data to not refresh in the query. Both queries use the same company code variable. When running the workbook I have each query set to "refresh query when running workbook". I have been able to duplicate this problem in either of the two queries, depending upon which company code variables I use. When I run the workbook, one of the two queries never updates company code variable unless I "refresh" the query directly after pulling up the workbook.

I have changed the company code variable and used other codes in each query, some required, some not, but ultimately a few of the key figures are not populating with current data because the company colde is missing...unless I hit refresh on that query. I have tried creating new workbooks and removing and reinserting the queries, but this doesn't work either.

And both queries run fine when executed alone.

Again, Both queries use the same company code variable.

Any help will be rewarded with points and is appreciated.