Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access VBA
|
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 May 2nd, 2011, 04:22 AM
Registered User
 
Join Date: May 2011
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default help required MS Access subform Object control.

hi,
i want to Enable or disabled form object(fields) depending on other fields value.
i.e m developing invoice software in MS Acess. and i want to disabled/enabled subform fields Invoice_Selection baseed on other field (Status) depending on two values
1= Order Placed
2 = Invoiced.
and an option field Name = Invoice_Selection.

so my question is, in a subform where (status) = Invoiced ,Invoice_Selection Fields object disabled. "only those where status = Invoiced" remaining will be enabled. (VBA Coding required)


m waiting for ur Response
 
Old May 2nd, 2011, 05:24 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi there,

Posting the same message over and over again in many forums is considered bad netiquette. You may want to review your messages and delete them, except for the one in the most appropriate forum category.

Cheers,

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
 
Old May 2nd, 2011, 12:48 PM
Friend of Wrox
 
Join Date: Sep 2010
Posts: 245
Thanks: 5
Thanked 24 Times in 23 Posts
Default

Quote:
Originally Posted by [email protected] View Post
hi,
i want to Enable or disabled form object(fields) depending on other fields value.
i.e m developing invoice software in MS Acess. and i want to disabled/enabled subform fields Invoice_Selection baseed on other field (Status) depending on two values
1= Order Placed
2 = Invoiced.
and an option field Name = Invoice_Selection.

so my question is, in a subform where (status) = Invoiced ,Invoice_Selection Fields object disabled. "only those where status = Invoiced" remaining will be enabled. (VBA Coding required)


m waiting for ur Response
I normally use the form's On Current event to handle this when navigating to records. I use control's after update event to handle this for the current record.

Example for a text box:

Code:
If (Me.status <> "Invoiced") Then 
     Me.txtMyTextBox.Enabled = True
Else
     Me.txtMyTextBox.Enabled = False
End If
or the short hand

Code:
Me.txtMyTextBox.Enabled = (Me.status <> "Invoiced")
__________________
Boyd Trimmell aka HiTechCoach (.com)
Microsoft Access MVP Alumni 2010-2015





Similar Threads
Thread Thread Starter Forum Replies Last Post
help required MS Access subform Object control. [email protected] BOOK: Access 2010 VBA Programmer's Reference 1 May 2nd, 2011 06:21 PM
help required MS Access subform Object control. [email protected] BOOK: Access 2007 VBA Programmer's Reference ISBN: 978-0-470-04703-3 1 May 2nd, 2011 06:10 PM
help required MS Access subform Object control. [email protected] BOOK: Expert Access 2007 Programming ISBN 978-0-470-17402-9 0 May 2nd, 2011 04:13 AM
help required MS Access subform Object control. [email protected] BOOK: Expert One-on-One Access Application Development 0 May 2nd, 2011 04:11 AM
MS ACCESS UPDATING A SUBFORM FIELD bernieregans SQL Language 1 February 3rd, 2006 04:26 PM





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