S
Steve Voorhees
I have downloaded Duane Hookom's "At Your Survey" database. I have been
looking around the database, which looks really good and thorough,
I do have a question about some code on one of the forms that doesn't appear
to be doing what it should. The code in question is:
Private Sub Form_Current()
Rspns.Requery
Me![Rspns].LimitToList = Me!LmtLst
If Me![RspnsType] = 1 Then
Me![Rspns].RowSourceType = "Value List"
Me![Rspns].RowSource = "Yes;No"
Else
Me![Rspns].RowSourceType = "Table/Query"
Me![Rspns].RowSource = "SELECT tblResponsesList.Rspns FROM
tblResponsesList WHERE
((tblResponsesList.QstnID=[Forms]![frmSurveyResponses]![sfrmResponses].[Form]![QstnID]));"
End If
If IsNull(Me![RspnsValid]) Then
Me![Rspns].ValidationRule = ""
Me![Rspns].ValidationText = ""
Else
Me![Rspns].ValidationRule = Me![RspnsValid]
Me![Rspns].ValidationText = Me![RspnsValid]
End If
' If Not IsNull(QstnMask) Then
' Me!Rspns.Visible = False
' Me!txtRspns.Visible = True
' Me![txtRspns].InputMask = QstnMask
' Else
' Me!Rspns.Visible = True
' Me!txtRspns.Visible = False
' Me![txtRspns].InputMask = ""
' End If
End Sub
If I am seeing things correctly,
If Me![RspnsType] = 1 Then
Me![Rspns].RowSourceType = "Value List"
Me![Rspns].RowSource = "Yes;No"
Else
Me![Rspns].RowSourceType = "Table/Query"
Me![Rspns].RowSource = "SELECT tblResponsesList.Rspns FROM
tblResponsesList WHERE
((tblResponsesList.QstnID=[Forms]![frmSurveyResponses]![sfrmResponses].[Form]![QstnID]));"
End If
is stating that if the field RspnsType = 1 then to have a value list. If
not, to use a Table/Query. The problem is that every field, no matter what
RspnsType is set to displays the field as a Value List.
Any suggestions?
looking around the database, which looks really good and thorough,
I do have a question about some code on one of the forms that doesn't appear
to be doing what it should. The code in question is:
Private Sub Form_Current()
Rspns.Requery
Me![Rspns].LimitToList = Me!LmtLst
If Me![RspnsType] = 1 Then
Me![Rspns].RowSourceType = "Value List"
Me![Rspns].RowSource = "Yes;No"
Else
Me![Rspns].RowSourceType = "Table/Query"
Me![Rspns].RowSource = "SELECT tblResponsesList.Rspns FROM
tblResponsesList WHERE
((tblResponsesList.QstnID=[Forms]![frmSurveyResponses]![sfrmResponses].[Form]![QstnID]));"
End If
If IsNull(Me![RspnsValid]) Then
Me![Rspns].ValidationRule = ""
Me![Rspns].ValidationText = ""
Else
Me![Rspns].ValidationRule = Me![RspnsValid]
Me![Rspns].ValidationText = Me![RspnsValid]
End If
' If Not IsNull(QstnMask) Then
' Me!Rspns.Visible = False
' Me!txtRspns.Visible = True
' Me![txtRspns].InputMask = QstnMask
' Else
' Me!Rspns.Visible = True
' Me!txtRspns.Visible = False
' Me![txtRspns].InputMask = ""
' End If
End Sub
If I am seeing things correctly,
If Me![RspnsType] = 1 Then
Me![Rspns].RowSourceType = "Value List"
Me![Rspns].RowSource = "Yes;No"
Else
Me![Rspns].RowSourceType = "Table/Query"
Me![Rspns].RowSource = "SELECT tblResponsesList.Rspns FROM
tblResponsesList WHERE
((tblResponsesList.QstnID=[Forms]![frmSurveyResponses]![sfrmResponses].[Form]![QstnID]));"
End If
is stating that if the field RspnsType = 1 then to have a value list. If
not, to use a Table/Query. The problem is that every field, no matter what
RspnsType is set to displays the field as a Value List.
Any suggestions?