Wrox Programmer Forums
|
BOOK: Access 2003 VBA Programmer's Reference
This is the forum to discuss the Wrox book Access 2003 VBA Programmer's Reference by Patricia Cardoza, Teresa Hennig, Graham Seach, Armen Stein; ISBN: 9780764559037
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Access 2003 VBA Programmer's Reference 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 September 3rd, 2004, 04:01 PM
Registered User
 
Join Date: Sep 2004
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default How to refresh picture in sub-form

Hi again,

I've used the the menuing system and the method of changing forms captions as described in the book and from code examples in the demo application "Chamber".

I expanded a little on the sysConfig_System table. My intent was to have the menus display a different logo for each database in use so the user would have a very visible, readily apparent indication of what database they were working with.

First, I added a new field (name = LogoName, type = OLE Object) to the sysConfig_System table and then inserted a .bmp picture of a logo for the database identified in the sysConfig_System table.

Second, I modified the form fsubMenu_Logo by; a.) specifying sysConfig_System as the record source for the form, b.)adding a bound object frame specifying the field LogoName as the control source.

The result was as expected, the logo showing on each of the menus, except for one problem.

When the database is changed using the Database Links command button on frmMenu_Configuration, the form caption changes (via the subroutine RefreshOpenFormCaptions in the module basGlobal), but the database logo on frmMenu_Configuration does not change.

When I close frmMenu_Configuration and frmMenu_Main is made visible again, the logo still hasn't changed. When I then click on a command button on the frmMenu_Main form, the resulting frmMenu_xxxx form shows the new logo.

My conclusion is that the logo needs to be refreshed in each open menu form after the database has been changed, just like the form caption is refreshed. BUT - I can't figure out how to do it.

I've tried various combination of Requery/Refresh as seemed appropriate, in various locations (i.e. right after the subroutine RefreshOpenFormCaptions is called in frmMenu_Configuration, during the On Current and On GotFocus events in frmMenu_Configuration, etc.) to no avail.

How can I accomplish this?

Thanks,



Tom

Streesed spelled backwards is Desserts.  Go have some ice cream when you are frustrated.





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
picture from vb-form to access kanoorani VB Databases Basics 0 May 31st, 2006 07:56 AM
Refresh Form sangata VS.NET 2002/2003 2 May 11th, 2004 03:01 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.