 |
| Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA. |
Welcome to the p2p.wrox.com Forums.
You are currently viewing the Access section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
|
|
|
|

May 20th, 2007, 08:41 AM
|
|
Registered User
|
|
Join Date: May 2007
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Continuous Form - Images
Hi.
I have an Access problem:
I have a continuous form which details of people. One of the fields states whether a person has filled in a form or not. I would like an image to appear if the form is filled, and a different image to appear if the form isnt filled.
The field is a text box and has a few different options.
Is this possible?
Thank You.
|
|

May 21st, 2007, 08:09 AM
|
|
Friend of Wrox
|
|
Join Date: Mar 2004
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
|
|
This is possible, but problematic on a continuous form.
What I would try is adding both images to the continuous form's detail section, and then setting both of them to Visible = No.
Then on the form's Detail section On Format event, you could do this:
If Me.MyTextBox = "Some Value" Then
Image1.Visible = True
Image2.Visible = False
Else
Image1.Visible = False
Image2.Visible = True
End If
The problem with continuous forms is that it will decide which value it should use from the first record, and apply it to all the records on the form. So this may not work. Conditional formatting on a continuous form is difficult.
Is this what you tried?
mmcdonal
|
|

May 21st, 2007, 03:48 PM
|
|
Registered User
|
|
Join Date: May 2007
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
ye, it applies it to all records. cond. formatting doesn't work with images unless anyone has any ideas
|
|

May 22nd, 2007, 10:06 AM
|
|
Friend of Wrox
|
|
Join Date: Mar 2004
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
|
|
It is doable, but problematic. You would have to do a query and match up the condition field to a table in which you store the images, and then base the continuous form on the images. Not fun.
mmcdonal
|
|

May 22nd, 2007, 10:07 AM
|
|
Friend of Wrox
|
|
Join Date: Mar 2004
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
|
|
Sorry, base the continuous form on the query.
mmcdonal
|
|

May 23rd, 2007, 05:16 AM
|
|
Registered User
|
|
Join Date: May 2007
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
sounds promising, how do you store images in tables?
|
|

May 23rd, 2007, 05:24 AM
|
|
Registered User
|
|
Join Date: May 2007
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
ok, sorted that bit. BUT
how do i get the image to appear on the form. at the moment i have to double click on the box and then the image opens in MS Picture Manager. I would like the pic to be present on the form.
thanks
|
|

May 24th, 2007, 06:27 AM
|
|
Friend of Wrox
|
|
Join Date: Mar 2004
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
|
|
Sorry for the delay. I am swamped at work and school. Take a look at the Northwind database. Open the EMployee form, and you can figure it out pretty easily from there. Does that help?
mmcdonal
|
|

May 25th, 2007, 08:31 AM
|
|
Registered User
|
|
Join Date: May 2007
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
All sorted, thank you very much for your time and help.
|
|

July 29th, 2009, 02:30 AM
|
|
Registered User
|
|
Join Date: Jul 2009
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Event does not exist
Quote:
Originally Posted by mmcdonal
Then on the form's Detail section On Format event, you could do this:
|
The OnFormat event does not apply to forms, only reports, so how could this possibly work?
|
|
 |