473,394 Members | 1,759 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Event and form

Hi,

I am creating a finance database from scratch. I have a yes/no field
in my table. I was wondering what can I do to display an extra field
when yes is clicked in this field. What events to use, what code?

Any suggestions?

Nyuszi
Nov 12 '05 #1
4 2407
Suppose the Yes/No Field is Called GoodBadPayer and bound to a Yes/No Field
in the table with the same name

Create a textbox called GoodBadPayerRelay with the ControlSource something
like

=IIf([GoodBadPayer],"Good Payer","Do not trust him gentle maiden").

The implication is if GoodBadPayer = true the display first message ,
otherwise second message

Phil
"Nyuszi" <nn***@yahoo.co.uk> wrote in message
news:4e*************************@posting.google.co m...
Hi,

I am creating a finance database from scratch. I have a yes/no field
in my table. I was wondering what can I do to display an extra field
when yes is clicked in this field. What events to use, what code?

Any suggestions?

Nyuszi

Nov 12 '05 #2
If this is a form in Form view (not Continuous or Datasheet), you can use
the Current event of the form to show/hide the extra field.

You will also need to use the AfterUpdate event of teh check box if you want
the field to appear/disappear immediately.

And you probably want to use the form's Undo event to examine the OldValue
of the yes/no field and restore the state.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Nyuszi" <nn***@yahoo.co.uk> wrote in message
news:4e*************************@posting.google.co m...

I am creating a finance database from scratch. I have a yes/no field
in my table. I was wondering what can I do to display an extra field
when yes is clicked in this field. What events to use, what code?

Nov 12 '05 #3
"Allen Browne" <Al*********@SeeSig.Invalid> wrote in message news:<3f**********************@freenews.iinet.net. au>...
If this is a form in Form view (not Continuous or Datasheet), you can use
the Current event of the form to show/hide the extra field.

You will also need to use the AfterUpdate event of teh check box if you want
the field to appear/disappear immediately.

And you probably want to use the form's Undo event to examine the OldValue
of the yes/no field and restore the state.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Nyuszi" <nn***@yahoo.co.uk> wrote in message
news:4e*************************@posting.google.co m...

I am creating a finance database from scratch. I have a yes/no field
in my table. I was wondering what can I do to display an extra field
when yes is clicked in this field. What events to use, what code?


I am using the form in Form view. The check box called Authorised
would display a date text box when clicked yes.

What do you mean by using the current event? What type of code could
go into the AfterUpdate and Undo event?

Thanks for info.

nyuszi
Nov 12 '05 #4
Private Sub Authorised_AfterUpdate()
Me.SomeDateField.Visible = Not Me.Authorised.Value
End Sub

Private Sub Form_Current()
Call Sub Authorised_AfterUpdate
End Sub

Private Sub Form_Undo
Me.SomeDateField.Visible = Not Me.Authorised.OldValue
End Sub

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.
"Nyuszi" <nn***@yahoo.co.uk> wrote in message
news:4e**************************@posting.google.c om...
"Allen Browne" <Al*********@SeeSig.Invalid> wrote in message

news:<3f**********************@freenews.iinet.net. au>...
If this is a form in Form view (not Continuous or Datasheet), you can use the Current event of the form to show/hide the extra field.

You will also need to use the AfterUpdate event of teh check box if you want the field to appear/disappear immediately.

And you probably want to use the form's Undo event to examine the OldValue of the yes/no field and restore the state.

"Nyuszi" <nn***@yahoo.co.uk> wrote in message
news:4e*************************@posting.google.co m...

I am creating a finance database from scratch. I have a yes/no field
in my table. I was wondering what can I do to display an extra field
when yes is clicked in this field. What events to use, what code?


I am using the form in Form view. The check box called Authorised
would display a date text box when clicked yes.

What do you mean by using the current event? What type of code could
go into the AfterUpdate and Undo event?

Thanks for info.

nyuszi

Nov 12 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
by: tony kulik | last post by:
This code works fine in ie and opera but not at all in Mozilla. Anybody got a clue as to how to get it right? <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <script...
18
by: Christopher W. Douglas | last post by:
I am writing a VB.NET application in Visual Studio 2003. I have written a method that handles several events, such as closing a form and changing the visible status of a form. I have some code...
5
by: Maxine G | last post by:
I have two forms, a menu and a data entry form. The entry form is bound to a query against linked SQL server tables. In the deactivate event, I have some code which asks the user if they want to...
13
by: Manuel Lopez | last post by:
I have a puzzling form timer problem that I didn't experience prior to Access 2003 (though I'm not sure access 2003 is to blame). Here's the situation: a computer has two access 2003 databases on...
5
by: Stan Sainte-Rose | last post by:
Hi, Which event is called when the user click on the close window icon (X) ? I want, when he clicks on this icon, to display a message before closing the form. If he replys by No, I don't want to...
0
by: Gary Shell | last post by:
I am experiencing some strange behavior between a UserControl's validating event and a treeview control. Initially, I thought it was related to an issue in the Knowledgebase article 810852...
41
by: JohnR | last post by:
In it's simplest form, assume that I have created a usercontrol, WSToolBarButton that contains a button. I would like to eventually create copies of WSToolBarButton dynamically at run time based...
8
by: hoofbeats95 | last post by:
I don't think this should be this complicated, but I can't figure it out. I've worked with C# for several years now, but in a web environment, not with windows form. I have a form with a query...
19
by: zacks | last post by:
I have a .NET 2.0 MDI application where the child form has a Tab Control. Each of the Tab in the Tab Control has a Validating event to handle what it should do when the user changes tabs. But...
0
MMcCarthy
by: MMcCarthy | last post by:
VBA is described as an Event driven programming language. What is meant by this? Access, like most Windows programs, is an event driven application. This means that nothing happens unless it is...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.