469,610 Members | 1,774 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,610 developers. It's quick & easy.

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 2214
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 discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

10 posts views Thread by tony kulik | last post: by
18 posts views Thread by Christopher W. Douglas | last post: by
5 posts views Thread by Stan Sainte-Rose | last post: by
reply views Thread by Gary Shell | last post: by
19 posts views Thread by zacks | last post: by
reply views Thread by devrayhaan | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.