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 March 24th, 2010, 10:43 PM
Registered User
Join Date: Mar 2010
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Unhappy Refresh combo box on subform


The problem I'm encountering is this:

- I have a form named "Client" with a subform named "ClientAssets"
- The "ClientAssets" subform contains a combo box named "AssetType"
- There is an "Add" button at the bottom of the "Client" form for adding a new asset type
- When the "Add" button is pressed, a pop-up form named "AddAssetType" appears
- The "AddAssetType" form is working correctly.
- On returning to the "Client" form, the command Me.ClientAssets.Form.Requery is executed when the "Add" button loses focus
- The requery command also appears to work okay, as it looks as though the data on the "ClientAssets" subform is being refreshed
- However, the new asset type does not appear in the "AssetType" combo box unless I exit and re-enter the "Client" form

Any help you can provide in solving this problem would be greatly appreciated!
Old April 9th, 2010, 08:25 AM
Friend of Wrox
Join Date: Jun 2003
Posts: 1,151
Thanks: 2
Thanked 14 Times in 14 Posts
Send a message via ICQ to SerranoG Send a message via AIM to SerranoG

Instead of requerying the entire form with


just update the combo with


This will also keep the focus where you last left it... I hope.
Greg Serrano
Michigan Dept. of Environmental Quality
Air Quality Division

Similar Threads
Thread Thread Starter Forum Replies Last Post
Combo box to display items from parent combo box Gini Visual Studio 2008 0 June 18th, 2008 12:30 AM
Combo box choice creating filtered combo box stevensj5 Access 11 September 13th, 2007 11:33 AM
Subform combo box 'reverse lookup?' russ2rsa Access 2 June 12th, 2006 08:26 AM
When to Refresh a SubForm ritag Access 4 October 1st, 2004 09:20 AM
Subform combo box insanity Freddyfred Access VBA 5 June 9th, 2004 07:37 PM

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