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 November 21st, 2006, 04:29 PM
Authorized User
 
Join Date: Feb 2004
Posts: 55
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to chacquard
Default form/subform problem

Hi,

I have a form and a subform. When I open the form, I want do display messages in a text field. The messages depend on the content of the subform. For example:

Message1 will display if the total of items in the subform are flagged as sold.
Message2 will display if the event is happening in the current month.
and so on...

I cannot find the right event to have the messages display. I tried 'on activate', 'on open', etc... of the form and subform, but the messages don't display. Right now, I have my validations done on the 'get focus' event of the first field that gets the focus in the subform, but unless we go to another control and come back to the first control, the messages don't display.

Note that in the main form, there are no fields that get a focus.

Can you please help me!:(

 
Old November 21st, 2006, 06:50 PM
Authorized User
 
Join Date: Nov 2006
Posts: 21
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I don't know if this can be adapted to your situation but here is something we use to display a message on a form for a 2nd letter process.

It evaluates a couple of controls on the form and depending on the situation, it displays a message to the user. It placed in a text box.


=IIf([needssecondletter]<>False And Not (IsNull([maildate2])),"Letter was Returned and Remailed",IIf(Not (IsNull([maildate2])) And [needssecondletter]<>True,"Letter Requested during Phone Contact",""))


John






Similar Threads
Thread Thread Starter Forum Replies Last Post
Printing a form with a subform in it jcalfg Access 1 July 25th, 2006 03:40 PM
Cant print when the form become subform yikchin Access 6 November 22nd, 2005 10:22 PM
How to link form and subform method Access 1 July 30th, 2005 02:19 AM
form/subform reference tmc Access 1 August 7th, 2004 04:16 AM
form/subform problem chacquard Access VBA 5 June 21st, 2004 10:45 PM





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