Ms Access Vba Continuous View Form Option Buttons

* Please try a lower page number.

* Please enter only numbers.

* Please try a lower page number.

* Please enter only numbers.

I think you'd have to simulate this by means of a bound object column in another table of two rows, and two columns, the other of which would be a key column referenced by the RecAllowRecalc column of the form's recordset.  You can then include this table in the form's query and simulate a button with the bound image.

_____________________
Ken Sheridan,
Cannock, England

"Don't write it down until you understand it!" - Richard Feynman

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

I'm sorry Ken, I not quite understanding your idea.  Could you try to explain it again.

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

That's a new feature in A2013, but in earlier versions the closest you can come easily is to use a bound option button.  That won't allow for an icon, but at least there is a visual difference between the On/Off states.

Since that requires the control to be bound, there is a slight issue about setting a changed record to the Off state in the form's BeforeUpdate event (when the record is saved).

Instead of using an option button, you could use a bound text box that can be made to look a lot like a command button.  This would be a little more convoluted, but it would allow you to use Conditional Formatting to affect the fore/back color and bold/italic properties.

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

I'm not sure that there's a great deal more I can usefully add, but the basic technique is one which was popular before the days of conditional formatting, and was used to 'colour code' rows in a form.  Essentially all that it involved was to have a separate table with two columns, one being the primary key and containing distinct values which matched those in the referencing table on which the colour to be used depended.  The other column contained a simple plain single colour bitmap image.  A form was based on a query which joined the two tables on the keys and showed the bitmap image in a bound control.  This could be a 'patch' at one end of the row, or could cover the complete row behind the other controls to provide different background colours depending on the value in the column in question.

The only difference in your case would be that the images would be those of your choice rather than plain bitmaps, and the control's Click event procedure would include the relevant code to do whatever you want.  The control is therefore simulating a button, and by giving it an appropriate border can be made to look something like a true command button control.

_____________________
Ken Sheridan,
Cannock, England

"Don't write it down until you understand it!" - Richard Feynman

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

Any chance there is a demo db somewhere I could dissect?

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

I think I get it, but when I try to insert the OLE Object (the image) on the form, all I get is a odd icon with the file name, not the actual image?!  And it does change record to record as I would like.  But how do I get the actual image to display?

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

Make sure the DisplayType property is Content and the Size Mode property is Stretch (assuming you want the image to fill the control).

_____________________
Ken Sheridan,
Cannock, England

"Don't write it down until you understand it!" - Richard Feynman

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

Nope.

Visible = Yes
Size Mode = Stretch
Display When = Always
OLE Type Allowed = Either
Update Options = Automatic
Display Type = Content
Enabled = Yes
Locked = No
Auto Activate = Double-Click
Verb = 0

Most of the setting are those that were there by default.  I even reset the default image viewer back to Paint for BMPs since I was using another application instead and read that this could be the problem, but it wasn't.

Any other ideas?

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

Just as an FYI, I have tried a number of different image formats (png, jpg, bmp, ico) and all do the exact same thing and do not display the actual image.

I even tried resaving the BMP using Paint (I had used another program originally to create them) just in case there was a difference between the file generated by a non-microsoft image application, but this again made no difference.

This is so frustrating because teh concept is in fact working, I get a different file name through out the continuous form, exactly what I want, just not the image itself.     So close, yet so far.   For something you'd think would be so straightforward to do in a continuous form!

Then after reviewing this article from microsoft http://office.microsoft.com/en-ca/access-help/what-to-do-when-you-see-package-instead-of-bitmap-image-in-your-database-tables-HA001151381.aspx?CTT=5&origin=HA001150411 , I see package in my table?!  Yet the files are indeed BMP formatted, and if I check in a form based on the table it shows lock.bmp, not package?!  I am lost.

Now I seem to be turning in circles, http://office.microsoft.com/en-ca/access-help/what-to-do-when-you-see-file-names-instead-of-images-in-your-access-database-HA001150411.aspx?CTT=5&origin=HA001151381

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

I don't have an answer, I'm afraid.  Using a bitmap image, I've tried both creating it from a file (.bmp) and creating it from new within Access, and in both cases the control in the form displays the image.  In fact I can't get it to display an icon!  I've done this sort of thing from Access 97  to Access 2007, so it can't be a version problem as far as I can tell.

_____________________
Ken Sheridan,
Cannock, England

"Don't write it down until you understand it!" - Richard Feynman

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

* Please try a lower page number.

* Please enter only numbers.

* Please try a lower page number.

* Please enter only numbers.

roarkburperear.blogspot.com

Source: https://answers.microsoft.com/en-us/msoffice/forum/all/independent-icon-in-continuous-form/bbd5e3f5-103c-4b6f-883a-4a97a1848ce5

0 Response to "Ms Access Vba Continuous View Form Option Buttons"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel