Wrox Programmer Forums
|
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
 
Old May 20th, 2007, 08:41 AM
Registered User
 
Join Date: May 2007
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default 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.

 
Old May 21st, 2007, 08:09 AM
Friend of Wrox
 
Join Date: Mar 2004
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
Default

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
 
Old May 21st, 2007, 03:48 PM
Registered User
 
Join Date: May 2007
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

ye, it applies it to all records. cond. formatting doesn't work with images unless anyone has any ideas

 
Old May 22nd, 2007, 10:06 AM
Friend of Wrox
 
Join Date: Mar 2004
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
Default

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
 
Old May 22nd, 2007, 10:07 AM
Friend of Wrox
 
Join Date: Mar 2004
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
Default

Sorry, base the continuous form on the query.

mmcdonal
 
Old May 23rd, 2007, 05:16 AM
Registered User
 
Join Date: May 2007
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

sounds promising, how do you store images in tables?

 
Old May 23rd, 2007, 05:24 AM
Registered User
 
Join Date: May 2007
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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

 
Old May 24th, 2007, 06:27 AM
Friend of Wrox
 
Join Date: Mar 2004
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
Default

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
 
Old May 25th, 2007, 08:31 AM
Registered User
 
Join Date: May 2007
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

All sorted, thank you very much for your time and help.

 
Old July 29th, 2009, 02:30 AM
Registered User
 
Join Date: Jul 2009
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Event does not exist

Quote:
Originally Posted by mmcdonal View Post
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?





Similar Threads
Thread Thread Starter Forum Replies Last Post
colour continuous form palmer Access 4 July 29th, 2009 03:26 AM
Loop through records on Continuous Form paulcbyrum Access 1 May 13th, 2008 06:28 AM
Filter Records in a continuous form darrenb Access 2 June 1st, 2007 06:50 AM
Continuous form / SetFocus help dbartelt Access 5 February 13th, 2006 03:59 PM
Write Conflict in continuous Form pinkandthebrain Access 2 July 18th, 2003 11:16 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.