Solved

Access 2007 Requery Not Working

Posted on 2011-02-22
6
269 Views
Last Modified: 2012-05-11
Hello,

I have a form with multiple subforms on it.  The original application was written in Access 2000.  I requery a form that has totals on the bottom of it.

For Example: Field is Sales
In the bottom of the form in the footer is a field total that is =Sum([Sales])

I run some queries to build the subform data and then refresh the subforms as follows:
 
  Me.Parent.PlanPat.Requery
    Me.Parent.PatColorHist.Requery
    Me.Parent.PatSizeHist.Requery
    Me.Parent.PatHistSColorSize.Requery
    Me.Include.SetFocus
    Me.cmdUpdate.Visible = False
    Me.FormHeader.BackColor = -2147483633

The first time I make selections and run it, all is well.  If I change the criteia and run again, all the sum fields disappear.  I can sit for 10 minutes and they dont display.  If I pop off Acces to another open application like Outlook and pop back, the fields display fine.

Never had the problem before "07"  any thoughts are appreciated.
0
Comment
Question by:vmccune
  • 3
  • 3
6 Comments
 
LVL 75

Accepted Solution

by:
DatabaseMX (Joe Anderson - Access MVP) earned 500 total points
ID: 34954118
You can try the basic stuff.
Create a blank A2007 accdb, then import all objects (except linked tables) from the A2000 mdb.

And even prior to this, just try a Compact and Repair on the ACCDB.

So ... you're saying it has never worked in A2007 ?

mx
0
 

Author Comment

by:vmccune
ID: 34954172
Been there, done those.

I just tried makeing a buttom on the main for and requiered without the parent and it still does not work.

Its not a big requery and the table soruce for the form has only 18 records.
0
 
LVL 75
ID: 34954241
So .... the data is there right, just not displaying until you change focus to another app window and back?

mx
0
Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 

Author Comment

by:vmccune
ID: 34954328
Yep.  Not only is the data there, all the records display fine and refresh EXCEPT the total buttons.
0
 

Author Comment

by:vmccune
ID: 34954377
I think I found the probelm.  One field is calulated and is looping.  I am awarding you the points for helping me.
0
 
LVL 75
ID: 34954427
glad you found it ...

mx
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

It took me quite some time to sort out all the different properties of combo and list boxes available from Visual Basic at run-time. Not that the documentation is lacking: the help pages are quite thorough and well written. The problem was rather wh…
In the article entitled Working with Objects – Part 1 (http://www.experts-exchange.com/Microsoft/Development/MS_Access/A_4942-Working-with-Objects-Part-1.html), you learned the basics of working with objects, properties, methods, and events. In Work…
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now