2d form for data entry in Access - forms

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.

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.

Access: Forms, Subforms and Queries

According to the searching I've done over the past couple of days, what I'm trying to achieve should be fairly straightforward but nothing that I've found has solved my problems. This is my first time at using Access, or SQL at all. Apologies in advance for the length of the question.
Essentially I need to pick up a value from one table and multiply it by another in the another table, and then store the result in the second table, via forms and subforms.
The Problem:
I'm attempting to create a database of projects, part of which is a quotation tool. The database has several tables covering all the required inputs for our project managers, most of which are linked to the PKs of their parent tables.
My current attempt has a form (frmJobDetails) giving the details of the each project (linked to tblJobs). This form has two subforms:
frmJobRolesSubform details who's working on the project in what role ( and, notably, their sale rate.
frmJobProcessesSubform details the tasks, who's allocated to which task and the estimated number of hours to complete.
Both subforms link to their own tables (tblJobs_Roles and tblJobs_Processes respectively).
frmJobProcessesSubform obtains the people working on the project and their roles from frmJobRolesSubform so the manager can allocate a person to a task on frmJobProcessesSubform. This is done via a combobox: cboRole.
So far, so good.
I'm needing to obtain the sale rate of the person working on the given task so that I can calculate the cost of the task. Specifically, I'd like a field on the subform to calculate the cost of the task and then store it in tblJobs_Processes.
My Attempts
I've attempted to build a query (qryProcessCost) that calls cboRole, either as an expression in the Field cell or in the Criteria cell ([Forms]![frmJobsProcessesSubform]![cboRole]).
I'm aware this can't successfully when the form isn't active, but I'm getting Access' request for input for [Forms]![frmJobsProcessesSubform]![cboRole] when selecting from the subform. The query runs successfully when example values are hardcoded into the query. The query should, obviously, only return a single value.
I've tried setting the ControlSource of a textbox to [qryProcessCost]![dblProcessCost] (where dblProcessCost is the calculated field), but this can't then write to the table (as far as I can deduce). Also, I get a #Name? error in the cell and I can't seem to get to the bottom of that.
I've tried setting the RecordSource property of a combobox to SELECT [qryProcessCost]![dblProcessCost] FROM [qryProcessCost], and the ControlSource to the relevant field of the table. While this would be a clunky solution, it actually doesn't work anyway as it fails to pick up the value of [Forms]![frmJobsProcessesSubform]![cboRole].
I've tried using an intermediate textbox to determine what value cboRole is passing, and I'm happy with that - the primary key of the role assigned in frmJobsRolesSubform.
The Question:
I'm guessing that I'm probably going to have to resort to VBA at this point to get what I want but I'm unfamiliar with the Access VBA structures (though I've used Excel VBA a fair bit).
Anyone got any ideas, hints, suggestions or pointers?
Cheers in advance,
Aaron
In case anyone else has a similar problem, I've posted my complete solution below:
I implemented Gene's correction to my references, which provided something, but the query wouldn't update when the fields on the form were changed. As I noted in the question, I also really wanted it to be a text box rather than a combo box for usability reasons but wasn't sure how to have a Record Source and Control Source for a text box.
I ended up going round in circles, via VBA and macros and several types of error and happened upon a suggestion to use a DLookUp here. I hadn't been able to get them to work for this particular problem before, but I managed to make it work this time. Specifically, I put the DLookUp in the following macro:
SetProperty
Control Name txtBudgetCost
Property Value
Value =DLookUp("[dblCostRate]","[tblJobs_Roles]","[pkJobs_RoleID]="[cboRole])*[txtBudg‌​etHours]
This macro was used for the After Update event of the relevant fields on the subform.
Setting the value property of a field to a DLookUp meant that I could set the Control Source property of a the text box txtBudgetCost to the relevant field in the table, to obtain the desired behaviour.
Both cboRole and txtBudgetHours are fields on the same subform as the field txtBudgetCost.
The only problem with this solution is that, when the subform is viewed in the Datasheet view, a #Name? error is given for the new record row. I probably just need to enter some error handling somewhere, though I haven't given much thought for what it should be just yet.
Cheers,
Aaron

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.

When a teacher add an assignment, all the student names appear. How to do it?

I have a task to create a database to track student results in a school. I came out with a set of relationships between the tables according to the 3 forms of normalisation(I hope I got it right. If not, please enlighten me).
One feature that I want to put in the Filemaker app is that when a teacher want to enter some assignment marks, he will just need to create a new submission record and all the student names in the class will appear.
I could not think how this feature can be done in Filemaker. I can only create a new submissions record and key in a student's score, then create another new record to do the same thing for a second student.
Can someone help? I am a teacher, not a Filemaker developer so please correct me if my database tables are done wrongly.
Update:
I will like the output to be like this
Spreadsheet is not suitable because it can't be used to search/sort easily.
I have a quick sample file here. It's an old sample and it uses a different (but similar) model. Basically the idea is that: You have a calculated field (I use a repeating field) to display the data. You also have a global repeating field that serves as an editing widget. Each time you go to a record you fill this field's reps with data from related records (using a OnRecordLoad trigger). This doesn't mean the field shows the same data for all records, because its conditional formatting rules are set to hide all data; so it only shows a piece of data when you actually enter one of its repetitions. This is the data that can be edited. And finally there's a trigger that fires each time you exit the field and posts your changes to the related table (adds, updates, or deletes).
The sample isn't quite complete because if there's fewer data columns than repetitions, you'd probably want to somehow lock the remaining repetitions; this part isn't done. Otherwise it works fairly well. In FM 12, however, it tends to freeze the app; I reported this to FMI, they acknowledged it, but I don't think it has been fixed already.