Wrox Programmer Forums
|
Access VBA Discuss using VBA for Access programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old October 28th, 2006, 06:57 AM
Registered User
 
Join Date: Oct 2005
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Refresh form code

Is there VB code for the function SHIFT + F9 to refresh a form? I have a form designed for sorting (searching) invoices where the user can tix boxes next to fields they want to search by, and enter data in them. Then the search button is pressed, which basically only needs to update the subform which uses a query as its data source.

The query checks the tick boxes and unbound fields in the parent form and that is working fine, but i can't get the subform to update with the resultant records! If I click on the subform, and on the access menu click Records > refresh, nothing happens. However SHIFT+F9 works. I need to have clicked on the subform first, assumedly so it is in focus, so what code would be a good alternative to this manual solution?

I've tried:
Forms("frmFindInvoices").refresh

and

Forms("frmFindInvoices").requery

- both after setting the focus to the subform.

Running out of ideas! any help appreciated! :)
 
Old October 28th, 2006, 08:57 AM
Registered User
 
Join Date: Oct 2005
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hmm... you know what, never mind. Somehow, this now works :)






Similar Threads
Thread Thread Starter Forum Replies Last Post
How to refresh owner form on closing of child form akumarp2p C# 2005 0 December 22nd, 2006 10:27 AM
Refresh Form sangata VS.NET 2002/2003 2 May 11th, 2004 03:01 AM
VBA - Form Refresh lxu Access 2 March 4th, 2004 11:13 AM
Refresh form while updating linked form mfletch Access 0 February 26th, 2004 10:32 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.