Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access
| Search | Today's Posts | Mark Forums Read
Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access 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 August 15th, 2005, 05:34 AM
Registered User
 
Join Date: Aug 2005
Location: Aberdeen, , United Kingdom.
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default Update a query by clicking on a tab

I have several queries that I have put on various form tabs what I need to achieve is each time i click on a form tab it re runs the query to show the up to date information. I hope this make sense!

 
Old August 16th, 2005, 07:33 AM
Friend of Wrox
Points: 4,007, Level: 26
Points: 4,007, Level: 26 Points: 4,007, Level: 26 Points: 4,007, Level: 26
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Lansing, Michigan, USA.
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
Default

On the tab control's ON CHANGE event, requery the controlsource of your subform. For example,

Select Case Me.ctlMyTabControl
    Case 0
        Me.sfrMySubForm0.Requery
    Case 1
        Me.sfrMySubForm1.Requery
    Case 2
        Me.sfrMySubForm2.Requery
End Select


Greg Serrano
Michigan Dept. of Environmental Quality, Air Quality Division




Similar Threads
Thread Thread Starter Forum Replies Last Post
Cross-Tab query subhanak Access 2 March 3rd, 2008 06:50 PM
Creating Cross-Tab query in SQL? WebLadyBug SQL Server ASP 0 March 9th, 2007 09:57 AM
I solved insert query.now see this Update Query. amit_mande@yahoo.com VB.NET 2002/2003 Basics 2 September 21st, 2006 12:48 AM
Cross Tab query aware SQL Server 2000 3 June 29th, 2006 04:22 PM
Tab item display prob / hide TABS query socoolbrewster CSS Cascading Style Sheets 4 June 13th, 2006 12:59 PM





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