Display Image Based on control in subform

J

Jason Lopez

This is the first of two questions. The other question will be a separate
post. I have a form where it shows the training completion of
organizational members. When their training is not complete, an image
displays "In Training." When complete, you see "Work Ready."

What I am trying to figure out is how to set up the VB code based on an
If-Then statement. In the main form, this is what I have displaying for the
member photos:

Me![ImageFrameMember].Picture = Me![ImgLoc]

Each training is done in phases and the table contains the dates of
completion (training is done by a separate department and therefore manually
entered). My thought is that I can add the VB code as part of the "After
Update" event in the subform control.

So, I am thinking of an If-Then statement kind of like this:

If
SubFormA!TrgPhase5Date Is Null
Then
MainForm![ImageFrameTrg].Picture = MainForm![path:\\complete.jpg]
Else
MainForm![ImageFrameTrg].Picture = MainForm![path:\\training.jpg]

The "path:\\" is just the path to the file. I am thinking that might be
more of a variable assignment. But I am not sure about that either.

I hope this is enough detail to visualize what I am trying to do

Jason Lopez
 
Top