MS Access Forum / Forms Programming / January 2007
Help on a Points Scoring system structure
|
|
Thread rating:  |
efandango - 26 Jan 2007 02:40 GMT I want to create a scoring system for every time a user gets a correct answer to a question. (Max 10)
At the moment I am using an unbound text box with a calculated ‘SetValue’ macro to record each correct entry based on a simple Yes or No unbound answerbox, (which is based on a drop down combo question box) the running total box is incrementing by 1 each time. So far, this all works fine for displaying the running score.
But now I need to store the values somewhere, but if I bind the calculated control to a table field it doesn’t work. So where and HOW would I store the data if it won’t go in a table?
Can someone give me some general pointers as to what the overall structure or direction should be to make this work.
Duane Hookom - 26 Jan 2007 05:49 GMT This is a tablesdbdesign NG so it would really help if you would share your table structure.
 Signature Duane Hookom Microsoft Access MVP
> I want to create a scoring system for every time a user gets a correct answer > to a question. (Max 10) [quoted text clipped - 11 lines] > Can someone give me some general pointers as to what the overall structure > or direction should be to make this work. efandango - 26 Jan 2007 17:51 GMT Sorry Duane, I didn't realise it was a TableDesign NG, the title say's 'Access Database Design', I took that to mean more general/conceptual design. But i guess the tables are fundamental to things, so:
The table simply consists of just four fields which serve the exisiting requirement to display a question and its answer counterpart field.
Run_No: Autonumber Point_Quiz_ID (Number generated by an append underlying query) Run_point_Venue_A (This is the question) Run_point_Address_A (This is the answer)
This table is linked to a form with the Unbound text boxes previously mentioned. One is the drop-down Combo box, which displays a possible 10 answers to the question. Once the user has selected the correct answer, an AfterUpdate macro does a SetValue on a Text Field Box setting its value to either Yes or No.
My problem is that i want to be able to now store the score for number of questions guessed correctly, but cannot find a way of storing an unbound or calculated control.
> This is a tablesdbdesign NG so it would really help if you would share your > table structure. [quoted text clipped - 14 lines] > > Can someone give me some general pointers as to what the overall structure > > or direction should be to make this work. Duane Hookom - 26 Jan 2007 19:37 GMT Check out the "At Your Survey" application found at http://www.rogersaccesslibrary.com/OtherLibraries.asp#Hookom,Duane. This might get you started. You would need to add a field to a table that identifies the correct response.
 Signature Duane Hookom Microsoft Access MVP
> Sorry Duane, I didn't realise it was a TableDesign NG, the title say's > 'Access Database Design', I took that to mean more general/conceptual [quoted text clipped - 36 lines] > > > Can someone give me some general pointers as to what the overall structure > > > or direction should be to make this work. efandango - 26 Jan 2007 20:06 GMT Thanks for the suggestion, but I have tried to understand how and where the Scores are stored in your program, but just can't get my head 'round it...
Can you just suggest how one gets around the problem of storing a calulated-generated field, bearing in mind that the field is initially generated to an unbound box and as such, any underlying query would not know of its existance in a table.
> Check out the "At Your Survey" application found at > http://www.rogersaccesslibrary.com/OtherLibraries.asp#Hookom,Duane. This [quoted text clipped - 41 lines] > > > > Can someone give me some general pointers as to what the overall structure > > > > or direction should be to make this work. Duane Hookom - 26 Jan 2007 22:54 GMT I would store the users' answers in a table. You can then compare the users' answer to the Run_point_Address_A field in your original table. If they are the same, the question was answered correctly. This can all be totalled in a query.
 Signature Duane Hookom Microsoft Access MVP
> Thanks for the suggestion, but I have tried to understand how and where the > Scores are stored in your program, but just can't get my head 'round it... [quoted text clipped - 49 lines] > > > > > Can someone give me some general pointers as to what the overall structure > > > > > or direction should be to make this work. efandango - 26 Jan 2007 23:52 GMT Your suggestion is exactly what is happening now on the form.
The user's answer is being compared to the [Run_point_Address_A field], both originate from the same table. If I were to do as you suggest, how would I store the 'answers' in another table?. Maybe I have my teeth in the wrong bone, but i just can' work out how I can store an unbound data field in a table?. This seems to me to be the crux of the problem. Even with a query using something like Ccur, Access assumes that the initial input data to derive a calculated field comes from a store table field that has been manually inputted.
I can understand why MS Access doesn't like the idea of storing calculated fields that can change depending on othr values, but it's not so much a calculated field as much as it is really a setvalue field. In this case a constant '1'. I wish Microsoft would recognise that users do sometimes need to store such fields as they are generated.
> I would store the users' answers in a table. You can then compare the users' > answer to the Run_point_Address_A field in your original table. If they are [quoted text clipped - 55 lines] > > > > > > Can someone give me some general pointers as to what the overall structure > > > > > > or direction should be to make this work. Duane Hookom - 27 Jan 2007 03:50 GMT I don't know why you are using an unbound form. If you check out the At Your Survey demo you will see how bind all the user answers. These answers have a field that identifies the question. Linking to the record containing the question and answer allows you to easily calculate if the user's answer is correct.
 Signature Duane Hookom Microsoft Access MVP
> Your suggestion is exactly what is happening now on the form. > [quoted text clipped - 72 lines] > > > > > > > Can someone give me some general pointers as to what the overall structure > > > > > > > or direction should be to make this work. efandango - 27 Jan 2007 09:46 GMT Because it seems the only way that I can generate a number in one control, based on a "Yes" or "No" entry in another. And if i try and bind the score control to the underlying table, i get an error message telling me that Access 'cannot find a Macro or it has not been saved yet..."
It seems the crucial factor as far as access goes, is that the 'score box' is a machine generated figure (via Setvalue), rather than a user inputted figure. I have searched everywhere online, and the only solution deals with a running total in the footer of a form, and the maths are done by an underlying query; but again that crucial difference comes up, namely a running total based on a figure originally inputted as a known figure by the user. But my form/table does not have a baseline figure to store in the underlying table for a query to do a calculation on. this is why I am obliged to use an unbound box.
I tried to fathom out your Survey, but due, in part to it's sheer versatility, i find it bewildering, and difficult to make the crucial correlation between your key 'store/bind' the result actions and my fairly one dimensional 'just store 1 figure each time'. I am simply not in the same league as you when it comes to complex databases, i can follow a one dimensional process, but there comes a point where my head just balnks out. I wish microsoft would incorporate a 'save this SetValue to a table' function, it would make life much easier for those situations where it's not strictly a calculated sum.
FYI:
The way my table works is that it comes from an Append query, this in turn gets its data from a large range of addresses. (1440). Each time the 10 question quiz is finished, the user asks for a new test via a requery. The questions are random (via a Rnd operator in the query).
Each address in the table has a unique identifier (autonumber) and is compared to the drop down combo, if they match, the text box say's "Yes', if they don't, it says "No".
> I don't know why you are using an unbound form. If you check out the At Your > Survey demo you will see how bind all the user answers. These answers have a [quoted text clipped - 78 lines] > > > > > > > > Can someone give me some general pointers as to what the overall structure > > > > > > > > or direction should be to make this work. Duane Hookom - 27 Jan 2007 14:46 GMT In the At Your Survey application, all questions are stored in tblQuestions. The possible answers are tblResponsesList which is related to tblQuestions by QstnID. You could add a field [Score] to tblResponsesList that identifies a score. The correct response would store a 1 in this field while incorrect responses in the list would contain 0.
The responses/answers from respondents are stored in tblResponses. This table also contains the QstnID field. There is a form and subform that makes response entry fairly simple.
You can create a query based on tblResponses and tblResponsesList that joins the QstnID and Rspns fields. You can then use the [Score] field to determine total points.
 Signature Duane Hookom Microsoft Access MVP
> Because it seems the only way that I can generate a number in one control, > based on a "Yes" or "No" entry in another. And if i try and bind the score [quoted text clipped - 114 lines] > > > > > > > > > Can someone give me some general pointers as to what the overall structure > > > > > > > > > or direction should be to make this work. efandango - 27 Jan 2007 17:47 GMT Duane,
Thanks for your help, advice (and patience...). Your summary of the srtucture makes things a good deal clearer. I shall now take myself of to digest this info. Hopefully I will be able to crack my problem.
One thought though...
If there was a 'one-dimensional', able to create just the one survey, version of YourSummary with data that was not so broad, but simple Apples, Pears, Oranges type stuff, things to the the new user would be much easier to follow. I can understand how it makes sense to you, as it has been your baby, but to people like me, it can seem bewildering.
Once again, Thanks!
> In the At Your Survey application, all questions are stored in tblQuestions. > The possible answers are tblResponsesList which is related to tblQuestions by [quoted text clipped - 128 lines] > > > > > > > > > > Can someone give me some general pointers as to what the overall structure > > > > > > > > > > or direction should be to make this work. Duane Hookom - 27 Jan 2007 19:28 GMT At Your Survey is somewhat meant to be a demo of how a normalized table structure can be used to create a survey. I kinda expect that most users would apply the concepts to create a single survey per MDB. When they want to create a new survey, there is generally no good reason to use the same MDB unless the survey results need to be reported between surveys.
 Signature Duane Hookom Microsoft Access MVP
> Duane, > [quoted text clipped - 144 lines] > > > > > > > > > > > Can someone give me some general pointers as to what the overall structure > > > > > > > > > > > or direction should be to make this work. DbMstr - 28 Jan 2007 05:07 GMT I built a weighted 'Survey' a couple of years ago that might help if you haven't determined what you need so far. Respondends answered a number of questions and were subsequently 'rated' based on their answers. I would have to dig a bit to find it but can send you what I did if it will help. Just need an email address if you want it. Dennis DbMstr
On Jan 27, 9:47 am, efandango <efanda...@discussions.microsoft.com> wrote:
> Duane, > [quoted text clipped - 162 lines] > > > > > > > > > > > Can someone give me some general pointers as to what the overall structure > > > > > > > > > > > or direction should be to make this work.- Hide quoted text -- Show quoted text -
|
|
|