images on a form


E

Eric Starn

Alright I have a db that is pretty basic. It has a First and Last Name field
a Title Field and seven YES/NO fields.
What I want is that when I run a query on a specific employee name it will
pop up a form displaying a photo of the employee and another image or
something displaying (basically pass or fail) whether they have completed all
test requirements. Meaning that all of the seven YES/NO fields are checked
yes. Again, if all of the seven YES/NO fields are check they pass and if not
they fail and I would like something to display to say that.
I have already figured out how to display to employee photos but I am not
sure how to complete the other task.
I have no problem explaining some more if needed.

Thanks

Eric
 
Ad

Advertisements

T

Tom van Stiphout

On Wed, 25 Nov 2009 12:18:08 -0800, Eric Starn

I would probably have both a Success and a Fail image on top of each
other, and set the Visible property based on the situation.

Depending on your exact situation this code may be in the Form_Current
event:
SetPassFail

And then have a private procedure:
private sub SetPassFail()
if Me.myCheckbox1 = True and Me.myCheckbox2 = True ...etc. Then
Me.myPassPicture.Visible = True
Me.myFailPicture.Visible = False
else
Me.myPassPicture.Visible = false
Me.myFailPicture.Visible = true
end if
end sub

-Tom.
Microsoft Access MVP
 
E

Eric Starn

OK
Thanks for the reply
I still need a little more help

Do you mean just to stack two image windows right on top of each other and
then how do you set it to be visible based on the situation?

I also need a little more detail on setting up and writing the code. I am
learning but I have along way top go.
Do you write the if statement using "Checkbox1" or do you replace it with
the field name?

Here are the field names for the check boxes
[IS - 100], [IS - 200], [ICS - 300], [ICS - 400], [IS - 700], [IS - 800],
[Rep 101], and [E - Team]

Thanks for the help

Eric
 
Ad

Advertisements

T

Tom van Stiphout

On Tue, 1 Dec 2009 12:16:01 -0800, Eric Starn

Yes, I mean place two image controls right on top of each other.

Then, as I wrote, where you set the visibility depends on your exact
situation, but it would likely be the Form_Current event. So get
properties for your form, click the events tab, and the ... button
next to the Current event. Place my one-liner in the event. Paste my
subroutine elsewhere in the code window.

-Tom.
Microsoft Access MVP

OK
Thanks for the reply
I still need a little more help

Do you mean just to stack two image windows right on top of each other and
then how do you set it to be visible based on the situation?

I also need a little more detail on setting up and writing the code. I am
learning but I have along way top go.
Do you write the if statement using "Checkbox1" or do you replace it with
the field name?

Here are the field names for the check boxes
[IS - 100], [IS - 200], [ICS - 300], [ICS - 400], [IS - 700], [IS - 800],
[Rep 101], and [E - Team]

Thanks for the help

Eric


Tom van Stiphout said:
On Wed, 25 Nov 2009 12:18:08 -0800, Eric Starn

I would probably have both a Success and a Fail image on top of each
other, and set the Visible property based on the situation.

Depending on your exact situation this code may be in the Form_Current
event:
SetPassFail

And then have a private procedure:
private sub SetPassFail()
if Me.myCheckbox1 = True and Me.myCheckbox2 = True ...etc. Then
Me.myPassPicture.Visible = True
Me.myFailPicture.Visible = False
else
Me.myPassPicture.Visible = false
Me.myFailPicture.Visible = true
end if
end sub

-Tom.
Microsoft Access MVP



.
 

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