By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,955 Members | 1,756 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,955 IT Pros & Developers. It's quick & easy.

Automatically Updating a Field in a Form in Access 2007

P: 1
Hey Everyone,

I am a bit of a noob at this, but have to build this database and
would love some help if anyone can provide any. I have a database
designed at capturing customer satisfaction surveys. I have a table
that captures answers to several different questions, ie;
Q1 - Rating (either Excellent, Good, Average, Poor)
Q1 - Score (either 10, 6.7, 3.3, 0)


The score corresponds with the text rating, these are then compiled to
give an average result for each question, for each staff member over a period of time.


The problem I am having is getting the "Score" to update automatically
depending on the result given in the "Rating" answer.


My table structure is basically like this:


SurveyResults:
SurveyID
CustomerName
EmployeeName
Q1Rating
Q1Score
....
Q10Rating
Q10Score


Scores:
ScoreID
Rating
Score


I have tried using an OnChange function etc on the form, but can not
get it to work. Can anyone please point me in the right direction of
the best way to tackle this?


Thanks in advance!
May 7 '07 #1
Share this Question
Share on Google+
2 Replies


MMcCarthy
Expert Mod 10K+
P: 14,534
Don't store the score in the results table, just the rating. You can then use DLookup in an unbound textbox on Form to show the score for each rating
May 7 '07 #2

Rabbit
Expert Mod 10K+
P: 12,347
Hey Everyone,

I am a bit of a noob at this, but have to build this database and
would love some help if anyone can provide any. I have a database
designed at capturing customer satisfaction surveys. I have a table
that captures answers to several different questions, ie;
Q1 - Rating (either Excellent, Good, Average, Poor)
Q1 - Score (either 10, 6.7, 3.3, 0)


The score corresponds with the text rating, these are then compiled to
give an average result for each question, for each staff member over a period of time.


The problem I am having is getting the "Score" to update automatically
depending on the result given in the "Rating" answer.


My table structure is basically like this:


SurveyResults:
SurveyID
CustomerName
EmployeeName
Q1Rating
Q1Score
....
Q10Rating
Q10Score


Scores:
ScoreID
Rating
Score


I have tried using an OnChange function etc on the form, but can not
get it to work. Can anyone please point me in the right direction of
the best way to tackle this?


Thanks in advance!
Seeing as how Score is related to Rating, you don't need to store both, just store the Score and you can translate to rating later when you need it.

If you want to show it on the form you can just use a textbox and use the After Update event of Score to display the rating.

What code did you try in the On Change? I'm thinking you'd use SELECT or PARTITION.
May 7 '07 #3

Post your reply

Sign in to post your reply or Sign up for a free account.