Capturing Variables

J

Jeff C

I am trying to build a simple automated question and answer form. My
questions are in a table and grouped. I am using a query to define each
group that I use as the recordset. My input box captures the answer values
but I am having trouble with two other things:

Most important is capturing the QuestionID (QID) in the answer table along
with the answer.

If possible the other thing was to use the actual question in the input box.
The code I have so far captures the first question but then it stays the
same even when the next record comes up.

Dim Answer As Integer
Dim Acct
Set Acct = New ADODB.Recordset

Dim MyQ As String
MyQ = Me.AcctQ.Value

Acct.Open "Accounting", CurrentProject.Connection, adOpenStatic

Do Until Acct.EOF

[Forms]![frm_TabTest].[AcctQ].Value = Acct![Question]
[Forms]![frm_TabTest].[AcctQID].Value = Acct![Q_ID]
[Forms]![frm_TabTest].[AcctQNum].Value = Acct![Number]

Answer = InputBox("Please rate your opinion of the following on a scale of 1
to 5" & " " & MyQ, "Rate The Level Of Service")

MyInput.Value = [Answer]
MyQuestion.Value = [QID]


DoCmd.Save
Acct.MoveNext

DoCmd.GoToRecord , , acNewRec

Loop

Any Assistance Appreciated

Thank you
 
Top