Building a Survey database and after 2 weeks of research, brain fatigue, and building/rebuilding, I've finished my tables and am working on the user Form. Let me also mention I took two c++ classes in High School and that was it for my programming experience.
So Basic background of function;
The Db uses two different question tables, a general question table that is static on the survey and a specific question table relating to the course they attended.
The two fields in the form that I am having trouble with is the combo box for picking your survey and the text box that I want to populate the Specific questions with. Right now my combo box displays the Survey Name, but populates text box with code most likely due to the " ".
(Let me mention I am using an example for updating a 2nd combo box instead of a textbox which may not be the right direction anyway - I've tried using a subform that comes from a multiple item form, but that would require adding coding for the forms in VB code somehow.)
I've based my design around this Microsoft post http://msdn.microsoft.com/en-us/library/bb404901.aspx
(( Private Sub cboSName_AfterUpdate()
' Update the row source of the tbSpecificQuestionText Text Box
' when the user makes a selection in the cboSName
' combo box.
Me.tbSpecificQuestionText.RowSource = "SELECT QuestionText FROM" & _
" QtblSQuestions WHERE SID = " & _
Me.cboSName & _
" ORDER BY QuestionText"
Me.tbSpecificQuestionText = Me.tbSpecificQuestionText.ItemData(0)
End Sub ))
I changed the RowSource around so the combo box (cboSName) displays the Names instead of the SID (PK)
(( SELECT [tblSurveys].SName, [tblSurveys].SID FROM tblSurveys ORDER BY [SID]; ))
Just to clarify my naming convention:
cboSName = combo box for table tblSurveys, SName being the contained text field
tbSpecificQuestionText = text box generated per cboSName based on the table QtblSQuestions
QuestionText = field with questions (duh)
SID = Pk for tblSurveys aka SurveyID
I'm braindead now and I've tried so many options that I may have messed up what I put in here, left out some data, or just plain gave too much info.
Thanks for the help, I'm so close to finishing this.