|
-
Sep 27th, 2007, 11:13 PM
#1
Thread Starter
New Member
[RESOLVED]problem passing arguments from access to vbs
hi everyone,
I want to use vb scripts to execute query in database access. In the database, I have a combo box for user to select a customer as a condition for the query. I have a problem to pass the selection from the database as arguement to vb script. Here is my code:
code in database:
Private Sub Command82_Click()
If dropdown.ItemData(dropdown.ListIndex) <> vbNullString Then
Dim selectCustomer As String
selectCustomer = CStr(dropdown.ItemData(dropdownReprice.ListIndex))
ShellWait ("wscript D:\SHUT_DOWN_CUSTOMER.vbs")
Else
MsgBox "Please select a Customer"
End If
End Sub
code in vbs:
Dim arg
arg = selectCustomer
SHUT_DOWN = "UPDATE Main SET Enabled = 0 WHERE Enabled = 1 And Customer = '" & arg & "'"
set cl = db.Execute(SHUT_DOWN)
How can pass an arguement as selectCustomer to vb script?
Thanks
Last edited by NJman; Sep 28th, 2007 at 11:00 PM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|