Is it possible to change the way a form loads with different data fields and values (Acces 2010) - forms

I have Access 2010. I was wondering if there is a way to get the form to load different for every selection.
Example
Item A has 10 Rows and 6 columns of filled in data
Item B has 3 Rows and 2 Columns of filled in data
Both are from the same table.
Is there a way when a certain item is selected from a drop down menu to load, without having multiple forms, only the filled in data? Output would resemble Excel format.
Thank you in advance for any help.

Quick Answer (TL;DR)
Creating dynamically-generated form structure in MSFT Access can be done with sub-forms.
Detailed Answer
Context
MSFT Access
Creating forms
Problem
Scenario: Developer wishes to create context-specific form structure that depends on the query output.
Solution
Create one or more sub-form with attached VBA that changes dependent on the query ouput.
Connect the subform(s) to the primary form and load as needed depending on the context.
See also
https://stackoverflow.com/questions/tagged/ms-access+forms+vba
https://duckduckgo.com/?q=msft+access+dynamic+subform
How to dynamically load, access and unload subforms in microsoft access

Related

Microsoft Access Form combo boxes and calculations

I have a question regarding a data entry form for project pricing estimates I am currently building.
To give you some context: The form will be used to enter data and complete calculations. It will replace an excel spreadsheet comprising of 59 columns, 1-15 rows (it varies by requirements) per project estimate. Average number of projects is 50-60 per year saved in respective customer folders. If there is an update to the estimate, a new version of the spreadsheet is created and saved in the respective customer folder. Hence, in certain scenarios, there are can be up to 10 versions saved per customer per project.
I am seeking to create a form-table combination for each of the customers: hence 10-15 forms with the same structure. Currently, I am only creating one form and table combination as a test. The table designed to replace the spreadsheet will use a total of 30 auto number foreign keys to store information. To be user friendly, I am using combo boxes in my form, where the user types in text but is stored as a foreign key in the table.
On top of this, I need to include calculations. For example, if the user selects certain options from my combo boxes, this will result in a calculated answer in an adjoining form field. Part of the calculated answer will use data in a linked table from another access database. Based on the options selected in the form combo boxes, the database will scan specific columns in the linked table to find matching entries to the selected combo box options. If a match exists, a price is extracted from that linked table. So say the combo box options selected are origin Miami and destination Salt Lake City, the database will scan for those 2 entries in the linked table. If that entry combination is found in the linked table, this price is to be used in the calculation. This price will then be multiplied by two other components entered by the user in the form, resulting in the calculated answer.
My questions:
Regarding the calculation example I gave above, can the above scenario be realistically accomplished in Microsoft Access? If so I am assuming I have to use VBA and/or Macros to do so?
a. If so, is it suitable to use my data entry form to complete it? Or is there an alternate way to achieve this result?
Will 30 combo boxes combined with such calculations have a significant impact on the speed of my form and database, especially as more data is added to the form and given that 10-15 forms will use the same structure? I have thus far included half of the combo boxes in 1 form, completed 1 test entry and I find that occasionally there is a slight lag when opening the form.
a. If it will impact my form's performance, what are my options/other form controls I can use to minimize lag and maximize speed?
Many thanks in advance!

Tableau performance

I've a problem with the dashboard in Tableau. In the dashboard there are many worksheets, and all the columns that are in the report are calculable. The problem is that dashboard is being formed for a very long time. The report contains approximately 2 million rows. And it is generated about 5 minutes.
Tell me, what are the solutions in this case?
Maybe I can somehow adjust the page display and not all the records at once?
To reduce the calculation time, try to exclude data you don't need with a data source filter in tableau. You can also hide or delete unused calculated fields. Other things you can do is reduce sheets that are not used.
Here's a link: https://www.tableau.com/about/blog/2016/1/5-tips-make-your-dashboards-more-performant-48574
Steps to follow to reduce calculation time:
Extract the data and use Extract data and also keep option as extract instead of live.Also replace the data source using extract data.
Use "User Filter" to reduce calculation time so that tableau will display of particular user data only.
I hope this will work to solve your problems.
I have one more idea to resolve this issue.
1)when you loan first time your dashboard put into Dashboard Action Filter
First Time load dashboard data exclude in your sheet.
Dashboard Menu->Action->add action->select sheet and exclude option.
2) Live to Extract data source and select radio button extract.
3)use user filter.
I am following the other answers (use extract, dashboard action filter...) and I want to add one point:
Drag every field used by any tablesheet on the dashboard on "Detail" of every tablesheet you are using on the Dashboard. Now Tableau loads all needed data while loading the first tablesheet and can use this data for the other sheets.
i.e. A dashboard contains three tablesheets (A, B, C) now you drag every field used by A on "Deatil" of B and C, every field used by B on "Deatil" of A and C, every field used by C on "Deatil" of B and A.
We are also having a similar issue with 150 million rows but I want to check if you are doing following steps. This may help you. This goes back to fundamentals of Tableau reporting.
1/ Try to make sure your data set is in star schema format. This will help a lot in report.
2/ Try to have tables and views in DB in such a way that same columns are used in Tableau. Any extra columns in tables adds to the performance issue.
3/Make sure indexing is done properly for all the fields that are joined.
4/ In my experience Dashboard adds extra performance lag. So make sure you try to get as much performance tuning on sheets as possible before even going to dashboard.
5/ If required try to use materialized views.
hope this helps.
Try to capture performance metrics using performance recorder option in Tableau.
Check for the underlying DB tables and joins present on the data source layer.
Try using optimized sets and parameters as required and get rid of less relevant filters.
Try using data extracts with scheduled refresh with data source filter for limited business years data.

how to put more than 1 record in an oracle apex form?

I have a problem with oracle apex forms.
The problem is that I want to add more than 1 record at the same time in 1 form. I have already read that the best way to do that is to use an csv file but then there is no tutorial to do that.
Oracle is a database, and combining files with databases is always tricky and not extensively supported for obvious reasons. Storing files and presenting them for download is one thing. Getting an Oracle database to open a file and reading and processing the contents is another. It sure it possible, but especially combining this with an Apex application I think you are going to run into a lot of challenges such as security restrictions.
However, stepping away from files does not necessarily mean stepping away from CSV. You could simply offer a large text input on your page in which a user can copy-paste a large CSV string. This can then be submitted and processed by the database. To do this you would probably need to create a process that gets fired after you submit the page. From this process you can parse the CSV data and insert multiple rows in a table. The same can be done for things like XML or JSON.
However, who is generating this CSV? Requiring a user to construct CSV is not very user-friendly. It can be complicated and error prone. If the CSV is generated by another application, isn't there a way to circumvent Apex and pass the CSV to the database directly?
If a single text-based data carrier is not required, which I doubt reading your descriptions, why not simply keep your form but allow the user to submit multiple forms? Would if be sufficient to insert one record per submit, and later using a batch to query these records and start formatting one at a time?
If you simply want the user to be able to enter multiple machines without having to submit the page for each machine, this is also possible, but you will have to leave some standard Apex functionality behind and implement some more custom javascript and PL/SQL functionality. Apex only allows a static amount of page items, which needs to be defined design time. So if you want to dynamically add fields such as text boxes and select lists to your page, you will have to resort to javascript. You could start by defining a region which renders one row of input fields at page load, and create a link under it saying 'add another row', which will render a new row of input fields under the existing one, and repeat this as many times as the user needs to.
That takes care of the UI. Now when the user has entered all the data he wants, we need to submit all this data and get it into the database. So yes, at this point we would probably have to get all this data from the input fields and turn it into one single string. This would all have to be done client side in your javascript code. You can then use the Apex page item API to assign this generated string to a single page item, using the $x(...) or $v(...) functions. Then submit the page, at which point the page processes will be fired. You then define a page process which will parse the data in your page item, and use that data to insert multiple rows in the database.

2d form for data entry in Access

I'm using Access 2010 and I would like to create a form where useres can enter data much like they can in an Excel format. The users need to enter a date when a step is complete for a specific unit.
In Excel the units run aross the top row, the steps run down the left column. In the cell where the unit and step meet, you put a date when it is done. In Access it is much harder to create a form that looks like this (at least it has been for me so far). I tried to use a crosstab query, but you cannot enter information into a crosstab query. I can do a massive form listing every combination of units and steps, but there are over 50 units and each one has 63 steps. I don't want users to have to look through a form with over 3,000 lines in it just to enter a date completed.
This definitely feels like something we should be using a database for instead of an Excel spreadsheet. I have the format for the back end tables to hold the data. My problem is how to create a form that is easy for the user to enter the dates.
I think you have three options. First, you could build the form from scratch, which you've already admitted would suck. And it would take a lot of VBA to get the data in the right place. Second, you could automate Excel - it's the same as the first method but you don't have to build the form. You would populate an Excel spreadsheet and write the changes back to the database. This is not a trivial task and I don't recommend it.
The third option is to throw away the idea that you want to do this in a grid. You've probably been doing it in Excel and to the extent that you replicate that, your users will be happy and comfortable. Moving to a database gives you benefits, but there are costs. This is one of the costs.
So create a form with a dropdown containing all of the units. When a unit is selected, populate a subform (datasheet view) listing all of the procedures and dates. The user can then select the unit, and fill in the date next to whichever procedures he wants. Then he can select another unit and do the same thing. If you set it up right, your data will flow to the tables automatically and you'll get all the benefits of data validation, input masks, relationships, and whatever else you're using at the table level.
I know that's not what you were looking for, but I think it's the best way forward.

How do I reference adjacent cells in an Apex tabular form?

Friends,
I'm converting an Oracle Form to Apex and have run into problem(s?) which I hope you can help with. Put simply the problem is how do I reference adjacent cells in an Apex tabular form? Is it possible?
The reason for asking is that I need to create a tabular form with 3 dependent select lists, lets call them:
Divisions
Cost Centres
Accounting codes
What should happen is, if the user chooses "Cost Centres" I need to check both Divisions and Accounting codes to restrict what is shown in the "Cost Centres" select list.
None of the fields are mandatory and the user can enter them in any order, e.g. On a new record the three selects lists have no values, the user selects "Accounting Codes" for which they see all the accounting codes after which if they select "Cost Centres" then they see a list of "Cost Centres" restricted by the "Accounting Code"
My first attempt was to put this in a single entry form where implementing this was a lot easier however this is not a viable solution.
The only example that comes close to what I need to implement is this from Denes Kubicek which blends a lot of technologies to achieve the result. Is this the only solution to this problem?
In case of need I am using Apex 4.0
Thanks for any help you maybe able to provide!
I haven't gone through Denes's example in detail, but yes I'm afraid that even with Apex 4.0 implementing cascading LOVs in a tabular form is going to be a complex task involving Javascript and AJAX. Apex 4.0 doesn't support dynamic actions on tabular forms, and it doesn't have the declarative "parent LOV items" attribute for tabular forms as it does for regular forms. In short, I don't think anything that has been added in Apex 4.0 simplifies this task - except that you can now use jQuery code to manipulate the DOM.