Change value in label when textbox value changes
Posted on 2012-09-11
I have an Access table with 5 records and 2 fields. Currently, Field1 is populated with the record number and Field2 is blank. It looks like this:
I have an Access form that has a textbox on it for the user to type in an answer to each of 5 questions. I have Next Record and Previous Record command buttons on the form. I want each question displayed in a label (unless there is a better way of doing this) depending on what record number the user is on. So, if a user is on record #1, I want question #1 displayed in the label. If the user clicks the Next Record button, I want question #2 displayed in the label, etc. I thought of saving the questions in a table but because I need to format them (some words in a question need to be italic, etc), I figured I'd just hard code the questions in the code window and display them in the label depending on what record the user is on. On my form (which has MyTable as its record source), I have a textbox whose control source is Field1 of the table, so that control can be referenced to know which record the user is currently on. How do I get the correct question to display in the label based on what record number the user is on? Thank you.