Yes No

G

Guest

I have a toggle button on part of a form that is a simple has it completed
yes no, but dependant on which is chosen, I want a picture to appear
somewhere else on the form, sort of a smiley face if Yes, a sad face if no,
does anyone know how this could be done.

Its to stop the user having to go to the end where the toggle button is to
see if the form is completed or not, first thing they see is the smiley face,
again any ideas

Many many thanks Matt
 
G

Guest

Hi Matt

Create a new field ( [FieldName] ) and set the font as Windings

For your toggle group set this behind the AfterUpdate event

Private Sub ToggleName_AfterUpdate()
Select Case Me!ToggleName
Case 1
Me.FieldName = "J"
Case 2
Me.FieldName = "L"
End Select
End Sub


Use conditional fomating to show bright red (L) or Green (J). set a very
large font size depending on your form size.


Hope this helps
 
G

Guest

You can do this with a little bit of visual basic code. Use the AfterUpdate
event for the toggle button to triger the change. To use a graphic stored in
an image control, in the after update code use a case statement like:

SELECT CASE Me!toggleControl
CASE 0
Me![ImageControl].Picture = "grumpy full file path and name"
CASE 1
Me![ImageControl].Picture = "smiley full file path and name"
END SELECT

where the toggleControl and [ImageControl] have the names of the items on
your form.

Alternatively, have the grumpy face displayed in the image control by
default, then use an IF statement in the after update event:

IF toggleControl = 1 THEN Me![ImageControl].Picture = "smiley full file path
and name"
 
G

Guest

Thanks guys I've had a go at both, fab, thanks again

Steve C said:
You can do this with a little bit of visual basic code. Use the AfterUpdate
event for the toggle button to triger the change. To use a graphic stored in
an image control, in the after update code use a case statement like:

SELECT CASE Me!toggleControl
CASE 0
Me![ImageControl].Picture = "grumpy full file path and name"
CASE 1
Me![ImageControl].Picture = "smiley full file path and name"
END SELECT

where the toggleControl and [ImageControl] have the names of the items on
your form.

Alternatively, have the grumpy face displayed in the image control by
default, then use an IF statement in the after update event:

IF toggleControl = 1 THEN Me![ImageControl].Picture = "smiley full file path
and name"



Matt-Sheff said:
I have a toggle button on part of a form that is a simple has it completed
yes no, but dependant on which is chosen, I want a picture to appear
somewhere else on the form, sort of a smiley face if Yes, a sad face if no,
does anyone know how this could be done.

Its to stop the user having to go to the end where the toggle button is to
see if the form is completed or not, first thing they see is the smiley face,
again any ideas

Many many thanks Matt
 
G

Guest

If you think an answer is helpful please chack the "was this post helpful" so
the the answerers get some feed back. (Is "answerers" a real english word -
if not it sounds like one so I will use it anyway :)

Good luck with you project

--
Wayne
Manchester, England.
Enjoy whatever it is you do


Matt-Sheff said:
Thanks guys I've had a go at both, fab, thanks again

Steve C said:
You can do this with a little bit of visual basic code. Use the AfterUpdate
event for the toggle button to triger the change. To use a graphic stored in
an image control, in the after update code use a case statement like:

SELECT CASE Me!toggleControl
CASE 0
Me![ImageControl].Picture = "grumpy full file path and name"
CASE 1
Me![ImageControl].Picture = "smiley full file path and name"
END SELECT

where the toggleControl and [ImageControl] have the names of the items on
your form.

Alternatively, have the grumpy face displayed in the image control by
default, then use an IF statement in the after update event:

IF toggleControl = 1 THEN Me![ImageControl].Picture = "smiley full file path
and name"



Matt-Sheff said:
I have a toggle button on part of a form that is a simple has it completed
yes no, but dependant on which is chosen, I want a picture to appear
somewhere else on the form, sort of a smiley face if Yes, a sad face if no,
does anyone know how this could be done.

Its to stop the user having to go to the end where the toggle button is to
see if the form is completed or not, first thing they see is the smiley face,
again any ideas

Many many thanks Matt
 
G

Guest

Sorry wayne its not worked, its a check box not a toggle button does that
make a difference, doesn't seam to recongnise 1 and 2

Wayne-I-M said:
If you think an answer is helpful please chack the "was this post helpful" so
the the answerers get some feed back. (Is "answerers" a real english word -
if not it sounds like one so I will use it anyway :)

Good luck with you project

--
Wayne
Manchester, England.
Enjoy whatever it is you do


Matt-Sheff said:
Thanks guys I've had a go at both, fab, thanks again

Steve C said:
You can do this with a little bit of visual basic code. Use the AfterUpdate
event for the toggle button to triger the change. To use a graphic stored in
an image control, in the after update code use a case statement like:

SELECT CASE Me!toggleControl
CASE 0
Me![ImageControl].Picture = "grumpy full file path and name"
CASE 1
Me![ImageControl].Picture = "smiley full file path and name"
END SELECT

where the toggleControl and [ImageControl] have the names of the items on
your form.

Alternatively, have the grumpy face displayed in the image control by
default, then use an IF statement in the after update event:

IF toggleControl = 1 THEN Me![ImageControl].Picture = "smiley full file path
and name"



:

I have a toggle button on part of a form that is a simple has it completed
yes no, but dependant on which is chosen, I want a picture to appear
somewhere else on the form, sort of a smiley face if Yes, a sad face if no,
does anyone know how this could be done.

Its to stop the user having to go to the end where the toggle button is to
see if the form is completed or not, first thing they see is the smiley face,
again any ideas

Many many thanks Matt
 
G

Guest

Your 1st post said it was a toggle - no worries use this on the after update
event of the checkbox


Private Sub CheckName_AfterUpdate()
If Me.FieldName = -1 Then
Me.FieldName = "J"
Else
Me.FieldName = "L"
End If
End Sub

Note this will place the "L" (sad face in windings) if you don't check the
box,
Oh and you may want to place some code OnOpen of the form so that you don't
have to go through all the records and change them.
Same as above code but the 1st line would be

Private Sub Form_Load()


I may have got the L and J mixed up (one is Happy the other is Sad) so try
them both, as I don't have MS access on this machine - this is air code (off
the top of my head)

--
Wayne
Manchester, England.
Enjoy whatever it is you do


Matt-Sheff said:
Sorry wayne its not worked, its a check box not a toggle button does that
make a difference, doesn't seam to recongnise 1 and 2

Wayne-I-M said:
If you think an answer is helpful please chack the "was this post helpful" so
the the answerers get some feed back. (Is "answerers" a real english word -
if not it sounds like one so I will use it anyway :)

Good luck with you project

--
Wayne
Manchester, England.
Enjoy whatever it is you do


Matt-Sheff said:
Thanks guys I've had a go at both, fab, thanks again

:

You can do this with a little bit of visual basic code. Use the AfterUpdate
event for the toggle button to triger the change. To use a graphic stored in
an image control, in the after update code use a case statement like:

SELECT CASE Me!toggleControl
CASE 0
Me![ImageControl].Picture = "grumpy full file path and name"
CASE 1
Me![ImageControl].Picture = "smiley full file path and name"
END SELECT

where the toggleControl and [ImageControl] have the names of the items on
your form.

Alternatively, have the grumpy face displayed in the image control by
default, then use an IF statement in the after update event:

IF toggleControl = 1 THEN Me![ImageControl].Picture = "smiley full file path
and name"



:

I have a toggle button on part of a form that is a simple has it completed
yes no, but dependant on which is chosen, I want a picture to appear
somewhere else on the form, sort of a smiley face if Yes, a sad face if no,
does anyone know how this could be done.

Its to stop the user having to go to the end where the toggle button is to
see if the form is completed or not, first thing they see is the smiley face,
again any ideas

Many many thanks Matt
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top