Access Form Random Boxes with Dashed Lines - ms-access

After any handful of events, these random square boxes with dashed lines appear all over my application's forms. I can't figure out why or how they are being generated. Is there some type of workaround for this issue? It doesn't seem code or design related.

It's a known bug in Access 2010 (and 2007?). You have a button on your form that has an image on it, with the size of the dashed rectangle.
The rectangle appears once the button has had the focus, and it won't go away. :(
Your database was probably migrated from Access 2003?
See here or here or here.
A possible solution from the second link:
Set the 'Picture Property Storage Format' property in Options\Current Database to 'Preserve source image format'. Try setting that property as well as resetting the picture property in the control.
I must try this sometimes, too. It's rather annoying.
Or if you are not really attached to the image, changing the button to text-only will be the easiest fix.

Related

ms access: pop up form is cut off in form view

I have pop-up form for data entry. The form has a subform on it that is surrounded by blank cells of equal sizes similar to padding. (Why not use padding instead? Because I want to add functionality to those cells later on). When I view the form in form view (opening it), part of the right hand side is cut off such that it no longer looks like equally sized padding.
What's weird is that if I look at the form in layout view, the form is not cut off. And if I then open the form FROM Layout view, the form is also not cut off. But if I open the form in any other way (from a button, vba, right click open from navigator etc.), it is being cut off every time.
Does anybody know why this might be happening and how I might fix it?
Form being cut off
Form not cut off in layout view
Form not cut off when opened FROM layout view
I found this issue occurs when working in access with a higher display resolution than 1920x1080. 3440x1440 in my case.
The only solutions I have found is what you described by opening the form in layout view then switching to form view then save the form.
Only other option is changing display resolution.
I'd like to share a "work around" on this same subject, hopefully it may help in certain cases where the issue is NOT due to Form Sizing through VBA code, which is determined to be the cause inadvertently.
My scenario:
Popup forms, set to auto center, auto resize, fit to screen = truncated, or overcropped form (and DESPITE my own VBA sizing code, which doesn't seemingly "take" or correct the issue).
I usually/often have the scrollbars property set to "neither", so I tried setting "both" on, and the popup form is no longer truncated. I then tried with ONLY the "Horizonal" bar set to on, and it still worked correctly. I then turned both BACK OFF and the form still sized correctly. I saved the form and it appears to have retained the "sizing" properly going forward.
It's as if when you turn these options to neither, the space normally occupied by those scrollbars is "taken off" the borders of the form "again" so maybe toggling that property to both/vertical only/horizontal only/neither "resets" and corrects it. Just a guess.
Hope this helps, spread the word of this little "work around."
O.W. Khan

Tab through a webpage manually

I am trying to navigate through a webpage using just my keyboard. Through the use of my tab key I can enter in data into several input boxes, and press several submit buttons.
However I run into a problem when trying to set focus to an image element on the page. For some reason it does not allow me to select it with the tab key. I can click on it with my mouse and then a popup appears but this really slows down efficiency.
I have considered creating a script in VBA to do this but right now I would prefer a quick-fix without having to spend hours developing a macro.
NOTE: I did quickly try to assign the reference to the <img> element and use the Click and Focus methods in VBA but that didn't work. I don't get an error, the code runs fine but nothing happens on the webpage. This leads me to think that this will be a bigger project than it appears, hence my reluctance to go down that path.
I did a bit of research and it seems that tabindex is not supported by the <img> element. Does that mean what I am trying to accomplish is impossible with the keyboard? Is code my only option?
If anyone knows anything that could help in VBA by all means I will take your advice into consideration.
Unfortunately the webpage is password protected and its a company account therefore I cannot post it.
After right-clicking inspect element in my Chrome browser this is what I see:
<img alt="View Quantities At Other Locations" src="/WebOrder/Images/CheckQtys.gif"
title="View Quantities At Other Locations" class="popup"popupdirection="upperleft"
popupwidth="380" popupcontent="#ProductQuantitiesForAccessibleBranches"
onbeforepopupcreate="onBeforePopupCreate_GetProductQuantitiesForAccessibleBranches(this)"
popupajaxformid="GetProductQuantitiesForAccessibleBranches"
onbeforepopupajaxpost="onBeforePopupAjaxPost_GetProductQuantitiesForAccessibleBranches(this)"
oncompletepopupajaxpost="onCompletePopupAjaxPost_GetProductQuantitiesForAccessibleBranches(this)"
productguid="00000000-0000-0000-0000-000000058927" displayitem="732899500"
brandguid="00000000-0000-0000-0000-000000000000" brandname="" brandsku="">
Does anyone have any ideas how I can set focus to this element (either with my keyboard or VBA)?
You can focus on a div using <div tabindex=0> Stuff Here </div>. Place the image inside the div and use the div to manipulate it.

infopath forms textbox word wrap chrome

The textbox in infopath form does not word-wrap the text in Chrome, but does it on IE? I have the multi-line setting checked on the text box. any idea?
Thanks in advance.
Upload a new css file to the “Style Library”.
File should contain the following:
textarea { white-space: pre-wrap !important; word-wrap: break-word
!important; }
Go to Site Settings – Look and Feel – Master Page
Set the Alternate CSS URL to point to the new CSS file that was added to the “Style Library”
Make sure to check “Reset all subsites…..”
Save and issue should be resolved for both Chrome and Firefox
You will have to replace the Text Box Control with a Rich Text Box Control and reconfigure the setting in the new control. You can rename the Rich Text Box control with the same field name after you delete the Text Box Control.
This is just common to Chrome right now, but Edge and Safari, could make the same changes, so might as well make the change to the form. Common to all three is they won't update a form when you make a change to the form.
You can add a "Query a Data Connection Rule" to another control (like a button) and when you use that control it will contact the server and update the form. If you use the same control on different views in the same form it seems to continue working, trial and error on that.
I assume Edge and Safari will make changes similar to Chrome, so you might as well change the Text Box to Rich Text. I have 300 controls to change. Good luck.
I have done it two different ways. I wanted to target only specific forms rather than spend a lot of time on it or do it in master page, I created CSS using Code from solution #1, then dropped it in the site assets library. After that I edited the InfoPath Forms SharePoint Web Part page, added a Content Editor Web Part to the page at bottom after the InfoPath Form Web Part, linked the new Content Editor Web Part to the CSS file, changed the Content Editor Web Part settings to not be seen, etc. and saved the Content Editor Web Part, Then Saved the Web Part Page.
Another way I have done this is added a Rich Text Editor Control to the InfoPath Form, then hide the original Text Box Control and set the Text box control default value to that of the Rich Text Editor Control. Sometimes this is quicker and easier than redoing all the business logic, especially if you are trying to go to PowerApps and get away from InfoPath, don't waste as much time on it. Obviously the drawback is increasing the number of SharePoint fields and fields in the form as well.
Best Regards.
SG.
Add a style.
textarea { white-space: pre-wrap !important; word-wrap: break-word !important; }
using script editor WP

Microsoft Access form opens minimised after its been changed

Im having an intermittent problem where forms open in view mode but minimised, looking like a small inch-sized box with the 'X' close button visible.
It normally seems to happen when Ive made a change to the form or code in the forms module, but happens randomly when being used in view mode.
I can only get round it by either re-importing a backup of the form or making the form border sizeable, either way it's not too professional.
Any ideas how I can solve this one?
Docmd.Restore seems to work on the form load event

swing: saving dialog box resize dimensions

I have a dialog box with a bunch of dimensions that a user can change by moving/dragging, including a JTable with resizable/draggable columns.
What I would like to do is to make the state of these resizable columns / dialog boxes / etc. persistent, so the next time my application starts up, the user doesn't have to go through the resizing step all over again.
What's the most convenient way to do this?
You should probably take a look at the code in (the now probably dead) JSR-296. A part of it was focused on persistent session state, and I know for sure that the code for persisting window locations and such was already functional and in the basic framework. It should either already do what you want, or provide a good starting point.
Cfr. dev.java.net site for JSR-296