Say there is a survey column where Questions and followed by Answers are in same column. I want to fetch the next row(Answer) for a particular Question ?
Related
Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 1 year ago.
Improve this question
I've created an Access report that is grouped by a person identifier and then displays all the rows in the source query related to that person identifier. I want to sort my report output by the person with the least number of rows to the person with the most number of rows. I can't use a GroupBy statement in the query because I have to display the detail records in the report. Hopefully this illustration helps.
Image shows a table with personid and multiple data columns.
When you say you can't use the GroupBy statement, does that mean you can't use the Total row in the Query Builder? (the reason I ask is because I've been able to achieve the same while still keeping the detail records)
So I made a replica of your table called tbl_people (and I added p# at the end of each field to make sure the data was going to the right area of the report) -close and save-
Then using the Query Builder, I added tbl_people and added PersonID TWICE.
Click the totals button towards the top; then change the first column from Group By to Count and make the Sort: Ascending (and I ended up naming it qry_count) -close and save-
Make a report, Right click on the square in the corner, click on Report Properties,
Go to either the Data or All tab and click on the little three dots to the right of Record Source
Add tbl_people and qry_count. Then drag PersonID from qry_count to PersonID in tbl_people creating an equal join. Then add ALL fields from tbl_people, click totals (at the top of the Query Builder), set ID Sort: Ascending. Then from qry_count add field CountofPersonID and make sure that is in the front of the query builder
On your report, add the fields (I added all of them from the table) then with the Sorting/Grouping (the same way you find the Report Properties) add a Group and add a textbox in the header and make the Control Source the CountOfPersonID. And that should do the trick! :)
I have a very simple quiz like app which is basically a question and answer. I want to common mistakes of the user i.e. on which question user is making mistake most of the time. For that I have custom event which logs an event every-time a user answers a question wrong. So if there are 5 questions and user usually answers question 3 wrong than the common mistake for that user is question 3.
But in data studio I am not able to find any formula which gets the number of frequency of event value from the big query data-sets. I am looking for a way to implement this any help would be appreciated.
I am using firebase custom events which is linked to bigquery.
Do you want the output of the table to show the Questions on the left, Frequency on the right?
Or you want the output of the table to show the Users on the left, Questions (common mistakes) on the right?
For the first type, create a table, set Question as dimension, Record Counts as a metric.
For the second type, you can create a pivot table. set User as row, Questions as column, Record Counts as the metric
I am collecting data from my students. I have their names, classrooms and attendee's numbers in a Google Spreadsheet.
I want to have a Google Forms where first they put their classroom (drop-down list). Then, they have to put their number (drop-down list). However, the number of options in this second question is not all the same. Each classroom has different number of students. So, the number of options for the second question is based on the first choice.
For the third question, I want them to put their name. To avoid them putting different name from what I have, I decided to put a drop-down list where the only available choice is their name (based on the answer of questions 1 and 2).
Is there a way to access the choices of previous questions before submitting them in order to determine the options for next questions?
For example, when the answer for first question is "A", there will be only four option for second question i.e. numbers 1-4. And, when the answer for this question is 4, then the only option for third question is "Doug".
I have tried using sections. But it will require so much works because there are more than 200 students in 16 classrooms. I tried using pre-filled forms (generating url for each students). This will require so much works too. Is there a way to access current response (not the last one) and use it to determine the next question's options? Thanks for the help.
I would like to obtain the last record entered in my database and display it in a textbox.
Here is what I tried
Previous_Project_Float_Detail.Text = projectRecordDT.Rows(projectRecordDT.Rows("FloatNo").Count - 1).ToString()
projectRecordDT is my datatable populated with records using mySqlDataAdapter.
In my database, I would like to retrieve the last record of the column FloatNo.
Usually I am able to retrieve this by creating a new datarow. But how do I obtain it efficiently without having to loop the records every time by using datarows?
I have managed to solve my own question because I misplace a parenthesis with the column name.
The correct way is
Previous_Project_Float_Detail.Text = projectRecordDT.Rows(projectRecordDT.Rows.Count - 1)("FloatNo").ToString()
The column name is after the row count. Not inside.
Also, this only works if the order of the records is already correct in your database.
I'm relatively new in using Access.
I'm creating a database for questions and answers. Answers are stored in the answertable with the following fields: timestamp, question id, answer text, person id. Each record only contains one answer.
Now, I'm looking for a way that lets me update/enter multiple records at the same time. For instance, the person using the form should be able to fill all respondent's answers, then hit submit. If there were five questions, the result should be five records with only the field 'answer text' differing from the other four.
I've searched on Stackoverflow but the only solutions that are given are in RoR. I'm experienced in VBA, but that's it.
Any help would be greatly appreciated. Thanks.
Your main form should be bound to the table that has one record per person. On that form you can add a subform (default view datasheet) that is bound to the table that has one record per question. You will want to set the link between the main form and the subform to be on person id.
Once you have the subform, you can hide the person id and question id fields.
Before you open the form, you will need to run a query to make sure that all the required questions that the person should answer are already added to the answer table, populating both person id and question id.
You may want to adjust the datasource of the subform to include the question text by linking to the table that is keyed on question id.
Well, if a question should have only one answer, and an answer should have olnly a question, why are they in different tables?
But, if your question table should have more than one answer, its ok.
You cannot edit multiple records in MS-Access in same time. You must to implement a form in GridView mode, wich will retrieve the desired questions, or allow user to add records on it. When user edits all the rows, the user should click a button wich will startup a process that will read the gridView and update the table, one by one.
The smartest way ought to be create a form in gridView mode, linking it to the answer table. Then filter the data presentagion on this form to fit in your desired params. When the user edits an answer presented, this row will be automatically updated in table.
I disagree with your fundamental UI question. One question and one answer on a form.