ChoronoForms v5 dropdown field dynamic preselection - forms

My question is a very simple question:
I want to preselect the single data stored in a previous form in a dropdown field of a form (chronoforms v5).
In other words: In the previous form user has chosen 'New York' from a cities dropdown field.
Next time the user enters in the form he has to see the dropdown field positioned to the city of 'New York'.
Any suggestions?
Thanks a lot

Assuming that your users are registered and logged in them you can save the User ID and the selected value to a database table in the first form; then in the second form use a DB Read action in the On Load event to recover the saved value.

Related

How to set yes/no value to no in a table on a form load to log out all users

So I'm creating a ms access database to allow associates to request time off and i need to be able to auto fill a text box based on the user login. that being said, i have a table that has all of the usernames passwords and employee names in it with a yes/no column attached to each user. My question is how can i get the yes/no value to auto set to no when the "login screen" form loads? I want to use the usernames in access not enviorn(username) to get the windows username.
"My question is how can i get the yes/no value to auto set to no when the "login screen" form loads?"
Create an update query that updates the yes/no field to 0 in table Users (usernames passwords and employee names in it with a yes/no column attached to each user)...name it i.e. ZeroUsersQry
then in the OnLoad event of form login:
docmd.setwarnings false
docmd.openquery "ZeroUsersQry"

Autofill fields in a subform of access2003 based on a previous entry/field

First off, I am new at this. Secondly, yes I am working with access 2003 and this is not by choice. It is the program that my job has provided to me, so I am stuck using it.
Question: I have created a form with a subform in access2003. The form has three fields: State, Year and CompanyName.
The sub form then lists three fields: CompanyID, Date, and AmtPaid (in dollars).
I would like for the subform to autopopulate/autofill in the CompanyID in the subform each time I have users enter a new line of data in to the subform.
For example: I choose the following in the form...State=PA, Year=2017, CompanyName=ABC (ID=2).
I then can enter values in to my subform...CompanyID=2, Date=3/1/17, AmtPaid=$10.00.
When I go to enter a new line of data, for example the amount paid for the same company on 4/1/17, I would like for the CompanyID to automatically fill in "2". My goal is for this field to autofill for each company ID since I am planning on avoiding user error and also planning on hiding this field.
I understand the default assignment in the properties window of the field, but if i enter in the number "2", then "2" will be entered by default for all companys, not just for company ABC. I believe i have to write some sort of code that references a previous field or the first field in the subform, so that the new line copies what has been entered previously.
Any help is much appreciated in advance.

How to retain the value of an editable text field in a Lotus Notes form every time the user opens it?

I have a form in Lotus Notes containing an editable text field.
Once the user enters a value in that field, it gets saved properly when I check it by opening the document from the back-end.
But I need this value to be seen in the form every time the user opens the form.
Because it is a configuration form where the user should be able to see all the values saved.
For example, a field which contains the path to download a report. And it should be an editable field itself. Is there any way to do this? Any sort of clue or help would be really appreciated. Thanks in advance!
The value of an editable field stored in a document does keep it's value every time the user opens the document.
It sounds like you may ask for something else. You want User A to create a document, enter a value (i.g. a download path) and save the document. When User A or User B later creates another document based on the same form, the previously entered value should be the default. Is that what you mean?
In that case you could simply use #DbLookup or #DbColumn in the formula language in the Default Value property of the field.
Or create a lookup view with the previously created document, sorted descending by date, then use the GetFirstDocument method of the NotesView class to get the first document in that view and read the value out of it using the GetItemValues method of the NotesDocument class.
Performance tip: If you make sure the value you want to look up is visible in the lookup view you can use the GetFirstEntry method of the NotesView class, then use the ColumnValues property to get the value, this is much faster.
Solution is to use #DbColumn in the default value of the editable text field of my form

Before Update Event or After Update Event (MS Access 2013)

I develop small database which gets bigger every day and I've got a situation with Before Update Event on one field.
Let's say I have main form which has subform based on the table (PONSt). The subform has one specific field (PONSt_PDV) which data depends on the other table (APP_PDV). When user updates that field (PONSt_PDV) directly in combo box, Before Update events is triggered and some calculations are done. That works perfectly!
The second situation (which is the reason for this question) is when user double clicks that combo box to open pop up form which contains the data from the other table (APP_PDV). In that pop up form user can edit, add or delete it's data and everything works great. There is a button on that pop up form which is used to get data (ID) from that table (APP_PDV), store it to the first table's field (PONSt_PDV), close the pop up form and get back to the first form (sub form on the first form, to be exact). After that, I want to recalculate other fields (in the first table PONSt) depending on the change in field (PONSt_PDV), but Before Update (or After Update) event in that case doesn't trigger at all.
What I'm doing wrong? Is there something that I can't see? Thanks!

oracle apex 4.2 : populate a form when page is loaded

How can I populate the form when the page is loaded
I have tried an query base form, and a automatic fetch, but neither will display any data when the page loads.
You must create "Automated Row Fetch" process on the page. For each item on page change the "Source Type" to "Database column", and enter column name in "Source value or expression".
When using the page wizard to create a query based form, the query given in the wizard is only used to define the fields on the form and create the corresponding page items. It is not used to subsequently populate data.
For that you need to add a process in a region above/before your form. Make the process PL/SQL type and provide your query there. Assuming your form is on page 2 and has fields ID and Name, use:
select name into :P2_NAME from my_table where id = :P2_ID;
The page or link that calls page 2 will need to set the value for P2_ID.