Access Pop Up Form Background Garbled/Distorted When Opened via OpenForm Macro Action with Window Mode Normal - forms

I have a database that I work on using Access 2013, though I must maintain compatibility with Access 2010; I am using Windows 7.
I have an input form that is set to Pop Up = Yes, and Modal = No. When opening this input form directly from the Navigation Pane, it functions perfectly normally.
I have a macro in a search form that calls up this input form with the specified record using the "OpenForm" action. When opening the input form with this macro, the form's background is totally garbled (it pulls the background image from whatever was behind it when called, as though it were transparent), and all labels are unreadable.
That said, if I run the macro again by trying to open a different record, the form then appears correctly until it is closed. Also, if I change the "Window Mode" in the "OpenForm" action to "Dialog" rather than "Normal," it appears correctly.
Neither of these are valid solutions, though -- it should work on the first time, and I do not want the form to be modal. All my code seems okay (insomuch as I am not receiving error messages), so I don't understand why it would be doing this... any guidance is very much appreciated.

I have discovered what is causing this problem, though I don't understand why.
The macro I am using came from a sample database, and has some commands I am not fully familiar with. One such command is "Requery."
I experimented with removing various parts of the macro with the window mode as "Normal" for the "OpenForm" command. As soon as I tried removing "Requery" (and nothing else) the window opened in "Normal" mode with no distortion whatsoever.
In short, having "Requery" in the macro was what was causing this error to occur. It seems like an innocuous enough action (all it does is refresh data, from what I understand, as described here: https://msdn.microsoft.com/en-us/library/bb177360(v=office.12).aspx), but since I don't see why its inclusion was necessary anyway (if anyone could shed some light on that, it would be appreciated), it looks like this is essentially solved.
I hope this may help someone else in the future!

Related

Plotly Dash - Callback triggers sometimes & the same callback doesnt trigger sometime

I am facing issue with callbacks. I have 3 drop downs, one scattermap , one table and one slider on the screen and they all need to work in tandem and i have 5 call backs. When i execute the application all my callbacks associated with these controls execute in random order. After that when i click on scattermap it may or may not work. Say we assume it worked. Then i can navigate all around without any hassle. Then if i execute the application then click on the scattermap then as i mentioned it may or may not work. Say suppose it didn't work this time. If so is the case it will not work at all no matter what i do and simulaneously one specific dropdown also becomes dysfunctional. However if click any of the other two drop downs then evrything will start functioning as normal.
I have digged really deep into this and figured out that this has nothing to do with my code. The underlying issue is that when the click doesn't work the reason the reason behind that is the callback isn't getting triggered. I found out this by applying some debugging techniques and i am 100% sure the callback is not firing. Can anyone help me resolve/understand this please.

GUI: configure the racket:text% to read-only

I want to use an editor to display a log from a program, I just need a very basic text field:
With a vertical scrollbar
With a contextual menu for copy/paste
Prevent the user from changing the text
In order to activate the copy/paste menu, I use the class racket:text% from framework rather than the basic one.
How to prevent the user from changing the text?
I read the documentation, as far as I understand the closest thing I found is lock method:
https://docs.racket-lang.org/gui/editor___.html?q=lock#%28meth._%28%28%28lib._mred%2Fmain..rkt%29._editor~3c~25~3e%29._lock%29%29
But it is not convenient, as it also prevent my program to write the data.
I also find get-read-write? but cannot find set-read-write.
Use the lock method, and just unlock the editor around any modifications that you want to do. You may find it useful to write a call-with-unlock helper function or with-unlock macro.
If you do your updates from the eventspace's handler thread (and you probably should; use queue-callback if they originate from another thread), then as long as you re-lock the editor at the end of an update, the user will never be able to interact with the unlocked editor.

C# flipping mainwindow

this is my very first entry here, may it not be the last....
I am having a bit of a struggle with some GUI stuff.
I really have an animation up front my eyes and it should look like the following: using c# with desktop application.
This Form looks like a login window with server address, username and pw textboxes and with a connect button as well, so nothing special. Size wise it can be small or at least same as size as the turned window. doesnt matter at the end.
once you entered your credentials and all turns out to be fine, connection is there and valid.
The main Form is suppost to flip then (doesnt matter horizontal or vertical),
and shows you your options you got then in this newly window. kind of an animated sign, that you are logged in and have now these options.
But the flip is suppost to stay on the same place. Like a card flip or a coin flip, but just the whole form and it ends then at the same place as before.
(sounds really wired to explain)
This can also be done with a new form poping up, just with a animated turn over, no problem with that.
And this is exactly where I am stuck.
I really cant find any information on how this would look like in code or even in animation.
I am using c# and the basic project started as a desktop application project, which it will be at the end.
Its been a while since my last coding, please be gentle.
i know there are plenty of entries in here also in google as well, but i didnt found anything which will do this for the main window as a total. images etc: yes, but for the whole form: no.
Any help out there?
May be tehr eis a trick i am not aware of? Its been a while since the last coding work, I need to admit that.#greyhairsarecomming
many thanks in advance! much appreciated
kind regards TG

MS Access 2013 textbox update macro

What I am trying to accomplish:
Use button to open a form, filter the form, and set specific value to an unbound textbox in the opened form's header. There are multiple buttons being used open the same form and I would like this textbox to changed every time a specific button is clicked.
What I have done so far:
Used a macro to open the form and the "where" condition to filter the records. I also used "SetProperty" to change the value of the unbound textbox in the opened form's header depending on which button was clicked. When I do used the SetProperty option in the macro I get the error "The control name ... is misspelled or refers to a control that doesn't exist. Error 32004
I have verified numerous times that this is the correct name for the textbox and everything. I am pretty new to access and don't do VBA all that much so any assistance would be greatly appreciated. Thanks.
First Form and Macro for the "Physical Security" Button
Second form with error and unbound txt box I want to change to "Physical Security"
A few Ideas to track down your problem:
Maybe there's a problem with opening and (immediately) accessing the forms controls(?) You could try to fire a macro from within the same from that (only) changes the value of this text-box to make sure it definitely works there. Of course you'd want to make it work there if it failed before you'd go back to your original problem.
Is the property called value? Could it be text?
Are you sure you need to separate (all) hierarchies using !? Just by desperation: Maybe try using Forms!frmVW.txtXY or Forms.frmVW.txtXY
If that doesn't solve it:
It's often best to reduce your problem to it's very basics. Copy your application (!!!!) and radically delete unneeded stuff. Or start a short experiment from scratch (one or two forms, maybe only a button and a textbox, a macro, most probably not even a single Datatable/Source).

Prevent main form from appearing when showing another form

I am trying to bring my secondary form to the Foreground, however when I do
MyForm.Show; // It may be hidden, therefore show it first
SetForegroundWindow(MyForm.Handle);
my Main Form appears aswell. The only way I can prevent that is to do MainForm.Hide; but I got to avoid that.
The idea is to have my secondary form appear on top of another application, without my Main Form having to do so as well.
If you consider to make another application for this functionality, then you may also consider the following compromise: minimize the MainForm to the taskbar (rather than hiding it) to prevent it popping up when activating another form.
If so, then try this answer. It does add an extra icon to your taskbar for the secondary form, but I guess that'll be no problem since a different application would either. However, if the MainForm is nót minimized but obfuscated by other windows, activating the secondary form wíll also popup the MainForm, just like you are experiencing now.
And for the completeness of this answer's sake, but not by any means meant as advice: this answer describes a (somewhat experimental) construction to make fully independent windows. The little time I tested that solution, it seemed to work, but be prepared not counting any longer on the full/default functionality of the VCL.
Try settings the state of the form to fsAlwaysOnTop.