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 June 25th, 2014, 06:25 AM
Registered User
 
Join Date: Jun 2014
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default access 2007

I have a report with a texBox which opens via a form. Changing the value of the TextBox from the form by means of VBA fails. The information in the TextBox is very important to the user, because tells him the time interval of the report's filter. The solution is higly needed. Please help !!!
 
Old July 2nd, 2014, 01:17 PM
Friend of Wrox
 
Join Date: Mar 2004
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
Default Detail section?

Hi,

Create a module called Public Variables, then add this to the module:

Public pMyValue As String

Then on the button that opens the form, capture the values in this public variable (I assume you are checking for this date range first):

pMyValue = Me.StartDate & " to " & Me.EndDate

Then on the On Format event of the section that has the text box, add this:

If pMyValue <> "" Then
Me.TextBox = pMyValue
End If

I hope that helps.
__________________
mmcdonal

Look it up at: http://wrox.books24x7.com





Similar Threads
Thread Thread Starter Forum Replies Last Post
Connect to Access 2007 with JavaScript awhatley Javascript How-To 3 April 4th, 2010 12:37 PM
How to specify relative path to Access 2007 in ADO connection string? [Excel 2007] sektor Excel VBA 4 September 3rd, 2009 11:59 PM
Access 2007 JohnBoy VB.NET 2002/2003 Basics 1 March 16th, 2008 09:33 PM
Access 2007 Ribbons? bgnetman Access VBA 2 October 30th, 2007 11:03 AM
Access 2007 - wtf? mmcdonal Access 7 December 19th, 2006 08:45 AM





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