A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

I can't get the form to do what I want!



 
 
Thread Tools Display Modes
  #1  
Old December 10th, 2009, 06:43 PM posted to microsoft.public.access.forms
Eric Starn
external usenet poster
 
Posts: 45
Default I can't get the form to do what I want!

I have a very simple table and form that I am trying to get something to work
on an then I will apply that to a larger db.

The table I have has four fields [First Name], [Last Name], [Quiz_1], and
[Quiz_2]
[Quiz_1] and [Quiz_2] are both checkboxes

I have created a form that shows these fields and two images. The first
image is a image that says No Pass named [NoPassImage]. The second is a image
that says Pass named [PassImage]

What I want is that when you move the form through the records only the
image that applies will display. If both quiz 1 and quiz 2 are checked it
displays the pass image and displays no pass for all other combination's.

I have been trying to get this to work so and idea will greatly appreciated.

Eric
  #2  
Old December 10th, 2009, 07:50 PM posted to microsoft.public.access.forms
fredg
external usenet poster
 
Posts: 4,386
Default I can't get the form to do what I want!

On Thu, 10 Dec 2009 10:43:01 -0800, Eric Starn wrote:

I have a very simple table and form that I am trying to get something to work
on an then I will apply that to a larger db.

The table I have has four fields [First Name], [Last Name], [Quiz_1], and
[Quiz_2]
[Quiz_1] and [Quiz_2] are both checkboxes

I have created a form that shows these fields and two images. The first
image is a image that says No Pass named [NoPassImage]. The second is a image
that says Pass named [PassImage]

What I want is that when you move the form through the records only the
image that applies will display. If both quiz 1 and quiz 2 are checked it
displays the pass image and displays no pass for all other combination's.

I have been trying to get this to work so and idea will greatly appreciated.

Eric


Using a Form in Single Form View?
Set the Visible property of both Image controls to NO.
Code the Form's Current event:
Me.PassImage.Visible = (Me.[Quiz1] + Me.[Quiz2] = -2)
Me.NoPassImage.Visible = (Me.[Quiz1] + Me.[Quiz2] -2)

Place the same code in the AfterUpdate event of both [Quiz1] and
[Quiz2]
--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail
  #3  
Old December 10th, 2009, 09:03 PM posted to microsoft.public.access.forms
Eric Starn
external usenet poster
 
Posts: 45
Default I can't get the form to do what I want!

Awesome it works

What does the "-2" mean?

Eric

"fredg" wrote:

On Thu, 10 Dec 2009 10:43:01 -0800, Eric Starn wrote:

I have a very simple table and form that I am trying to get something to work
on an then I will apply that to a larger db.

The table I have has four fields [First Name], [Last Name], [Quiz_1], and
[Quiz_2]
[Quiz_1] and [Quiz_2] are both checkboxes

I have created a form that shows these fields and two images. The first
image is a image that says No Pass named [NoPassImage]. The second is a image
that says Pass named [PassImage]

What I want is that when you move the form through the records only the
image that applies will display. If both quiz 1 and quiz 2 are checked it
displays the pass image and displays no pass for all other combination's.

I have been trying to get this to work so and idea will greatly appreciated.

Eric


Using a Form in Single Form View?
Set the Visible property of both Image controls to NO.
Code the Form's Current event:
Me.PassImage.Visible = (Me.[Quiz1] + Me.[Quiz2] = -2)
Me.NoPassImage.Visible = (Me.[Quiz1] + Me.[Quiz2] -2)

Place the same code in the AfterUpdate event of both [Quiz1] and
[Quiz2]
--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail
.

  #4  
Old December 11th, 2009, 05:06 AM posted to microsoft.public.access.forms
fredg
external usenet poster
 
Posts: 4,386
Default I can't get the form to do what I want!

On Thu, 10 Dec 2009 13:03:01 -0800, Eric Starn wrote:

Awesome it works

What does the "-2" mean?

Eric

"fredg" wrote:

On Thu, 10 Dec 2009 10:43:01 -0800, Eric Starn wrote:

I have a very simple table and form that I am trying to get something to work
on an then I will apply that to a larger db.

The table I have has four fields [First Name], [Last Name], [Quiz_1], and
[Quiz_2]
[Quiz_1] and [Quiz_2] are both checkboxes

I have created a form that shows these fields and two images. The first
image is a image that says No Pass named [NoPassImage]. The second is a image
that says Pass named [PassImage]

What I want is that when you move the form through the records only the
image that applies will display. If both quiz 1 and quiz 2 are checked it
displays the pass image and displays no pass for all other combination's.

I have been trying to get this to work so and idea will greatly appreciated.

Eric


Using a Form in Single Form View?
Set the Visible property of both Image controls to NO.
Code the Form's Current event:
Me.PassImage.Visible = (Me.[Quiz1] + Me.[Quiz2] = -2)
Me.NoPassImage.Visible = (Me.[Quiz1] + Me.[Quiz2] -2)

Place the same code in the AfterUpdate event of both [Quiz1] and
[Quiz2]
--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail
.


A check box field has a value of 0 (False, unchecked) or -1 (True,
checked).
So if you add the 2 check boxes values -1 + -1 = -2.
If the sum of the boxes equals -2 they are both checked, otherwise if
the sum is not -2, only one or the other, or neither box is checked.
--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 08:58 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.