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

E

Eric Starn

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
 
F

fredg

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]
 
E

Eric Starn

Awesome it works

What does the "-2" mean?

Eric

fredg said:
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
.
 
F

fredg

Awesome it works

What does the "-2" mean?

Eric

fredg said:
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.
 

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