Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need help to convert code from VBA to VBScript

Status
Not open for further replies.

Aiel

Programmer
Jul 22, 2002
1
US
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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top