I have created a Microsoft Access form for data entry, written in VBA. But I would like to change it to a Data Access Page, written in VBScript. Here is a summary of what my form does...
1.User chooses a Type from a drop-down list box(cboType)
2.Based on the Type, a query is run
3.The query results are placed in another drop-down list box
(cboSubtype)
I'm familiar with VB and VBA but have never worked with VBScript before.
Here is my code in VBA...
Private Sub cboType_AfterUpdate()
Dim strSQL As String
strSQL = "SELECT SubtypeId " & _
"FROM SubtypeLookup " & _
"WHERE TypeId = " & Chr(34) & Me.cboType & Chr(34) & ";"
Me.cboSubtype.RowSource = strSQL
Me.cboSubtype.Requery
1.User chooses a Type from a drop-down list box(cboType)
2.Based on the Type, a query is run
3.The query results are placed in another drop-down list box
(cboSubtype)
I'm familiar with VB and VBA but have never worked with VBScript before.
Here is my code in VBA...
Private Sub cboType_AfterUpdate()
Dim strSQL As String
strSQL = "SELECT SubtypeId " & _
"FROM SubtypeLookup " & _
"WHERE TypeId = " & Chr(34) & Me.cboType & Chr(34) & ";"
Me.cboSubtype.RowSource = strSQL
Me.cboSubtype.Requery