Is there a way to change text in the simple label (screen :label :text "input")? Tried different things, but none worked. Setting gadget value, accessing text slot..
Also for some reason creating label without :text and running the app reboots my user session.
Related
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).
Update: Manually losing the form and re-opening it also causes editing to be allowed, please see Step 4 below and "Additional Notes" section below. Thanks!
An MS-Access 2007 database that I have simplified a great deal during troubleshooting still has the same problem:
Restart Access and open the database
The autoexec calls a vba function that initializes some TempVars, then opens a form with: `DoCmd.OpenForm FormName:="MainEditor"
All Bound and Un-Bound Text Boxes and Combo Boxes display their data
correctly, but NONE of them can be edited. Keystrokes are ignored, pull-downs on Combo Boxes display lists of choices correctly but no choice can be selected.
Change the form's view to Design View, then immediately change it back to Form View. Alternatively, manually close the Form and then re-open it.
All the controls continue to display their data correctly, but now ALL of
them can be edited normally.
After changing to Design View and back to Form View, the Form is editable normally until Access is shut down and restarted.
Additional Notes:
I tried adding a DoCmd.Close and a DoCmd.FormOpen immediately after the original DoCmd.FormOpen in the startup function called by the Autoexec macro, but the Form remained unable to accept edits. Manually closing the form, and then manually re-opening it, seems to work every time. Is there any chance that Access needs a delay to process before opening the form, and manually doing the close/open cycle provides that time window?
Here's some background:
The Table has a primary index, 4 other indexes, and one-to-many relations to 7 other tables.
The Form's Record Source is the Table, and Allow Edits = Yes.
All the controls on the Form are set: Enabled = Yes, and Locked = No.
There are no sub-forms, only the one Form.
This isn't much to go on. If you ask for further specifics I'd be glad to provide them.
Thank you. Dave
Instead of using an Autoexec macro, specify a startup form.
I have a powershell script with a simple form which is working. It runs an external application (USMT scanstate / loadstate) and the functionality is all fine.
However when it's running the user has no feedback that it is working, so initial users were thinking something had gone wrong.
I've added a marquee progress bar to run at the bottom of the form to indicate it is working.
I can use the:
$progressbar1.visible = $False
Property to show whether it is visible or not, but I'm not sure how to make this dynamic. If I set to false then call the form with .ShowDialog() then try to change it later to True nothing actually changes in the form.
Am I missing something? Is there a way to dynamically change the visibility of a form object?
EDIT :: Adding the .Visible property change to the .add_click of the button.
$buttonYes.add_click({$progressbar1.visible = $True;Action $type;$confirm.Close()})
This does get the progress bar to appear, however the Marquee is not running which is strange, so it just shows an blank box...
EDIT 2 :: OK so looks like it does work, but only when run from the ISE. I've tried it on another system and running from command line or shortcut doesn't work. I've tried setting STA but still no go, the progress bar shows but now Marquee effect.
The object is to Show-Hide text located under their respective Titles, so a User reads the title and shows or hides text belonging to that title if the User wants to read more.
I tried whatever I could find so far on here, we're talking dynamically setting text coming from a spreadsheet, can't use IDs, must work with .class, must be missing something, I have this piece of code:
... html.push('<div class="comments">' + comment + '</div></div></div>');
but when I try this Show-Hide code nothing happens, even if the error console shows nothing. Basically I want to Show-Hide the .comments class divs with a show-hide toggle link located under each of them. I say them because the .comments divs are reproduced dynamically while extracting text coming from Google spreadsheet cells/row (one .comments div per spreadsheet row). I tried .next, child and parent but they all divorced me so I dunno looks like a dynamic issue. So far I only managed to globally toggle all divs to a visible or hidden state but I need to toggle independantly individual divs.
I prefer a jQuery solution but whatever worked so far was achieved with native javascript.
Note: If a cross-browser truncate function which would append a more-less link after a number of words (var) in each .comments divs would be easier to implement then I would gladly take that option. Thx for any help, remember I am still learning lol!
I have been working on an entirely JS UI project and have brought myself to using $('', { properties }).appendTo(BaseElement) to work best for adding HTML elements because it appropriately manipulates the DOM every time.
If you are having good luck with push elsewhere, however, breakpointing on the line where you do your $('.class').hide() and see what $('.class').length is. Alternately, you can just add alert($('.class').length) to your code if you are unable to breakpoint the code. If it is 0, then your elements have not been properly added to the DOM. Changing to append will ensure they are part of the DOM and therefore targetable via JQuery.
I would like to be able to control the initial shift state of the iPhone keyboard from a Javascript prompt (updates added for web forms). It seems to mostly default to an initial capital but I feel sure I've typed into/seen prompts that are initially lower-case. I also feel sure that I've seen custom layouts used from the web.
Googling around initially (see updates) didn't reveal any obvious documentation or previous answers besides saying that having "phone" or "zip" in the class of the input would bring up the numeric keyboard (although this may have stopped working). Apparently "url" or "email" could select the appropriate layouts also. This obviously doesn't apply to javascript prompts, and may not work in some versions.
Is there any official source for all this stuff? Does it work across all firmware versions? Has anyone got a general solution for changing keyboard layout or for doing this in Javascript prompts?
UPDATE
For web forms: found this from Apple straight after posting the question, along with this. The question still stands for Javascript prompts.
UPDATE 2
Doh! This is also useful; placeholder text and search button not mentioned in the Apple links. Some more relevant info here.
How do I control which keyboard is displayed when a user touches a text field?
You can control which type of keyboard is displayed when a user touches a text field in a web page. To display a telephone keypad, an email keyboard, or a URL keyboard, use the tel, email, or url keywords for the type attribute on an input element, respectively. To display a numeric keyboard, set the value of the pattern attribute to "[0-9]" or "\d".
These keywords and the pattern attribute are part of HTML 5, and are available in iPhone OS 3.1 and later. See Listing 15 to see how to display each type of keyboard, including the standard keyboard.
Listing 15: Controlling keyboard display
Text:
Telephone:
URL:
Email:
Zip Code:
See http://developer.apple.com/library/safari/#codinghowtos/Mobile/UserExperience/index.html