It's weird - I've used this code all over the place and it has always worked (well, up 'til now!)
I have an instructor FAQs form that has a question and then a button called "See Answer!". When they click the button, another form is supposed to pop up with both the question and the answer. Both forms are based on the same table, which looks like:
Question_ID - an autonumbered primary key
Question - the question
Answer - the answer! : )
In the On_Click event of the button, I have the code:
DoCmd.OpenForm "IKB: Instructor FAQs Display for Instructors", , , "[Question_ID] = " & Question_ID
This should pass the ID of the question (the ID's are correct) and display both the question and the answer. However, NOTHING opens! The form name is spelled correctly, I'm sure of that. What am I missing? Is there something in the form itself that needs to be changed? I've tried comparing every last setting on my other pop-up forms to this one and cannot figure it out.
Any insight would be great! Thanks! (Access 2007)
I have an instructor FAQs form that has a question and then a button called "See Answer!". When they click the button, another form is supposed to pop up with both the question and the answer. Both forms are based on the same table, which looks like:
Question_ID - an autonumbered primary key
Question - the question
Answer - the answer! : )
In the On_Click event of the button, I have the code:
DoCmd.OpenForm "IKB: Instructor FAQs Display for Instructors", , , "[Question_ID] = " & Question_ID
This should pass the ID of the question (the ID's are correct) and display both the question and the answer. However, NOTHING opens! The form name is spelled correctly, I'm sure of that. What am I missing? Is there something in the form itself that needs to be changed? I've tried comparing every last setting on my other pop-up forms to this one and cannot figure it out.
Any insight would be great! Thanks! (Access 2007)
Comment