Dim SQLFutSoldat As Currency----would like to pass this value to my stored procedure but not sure on the sintax on how to pass a second variable to it thanks
Dim Response As Integer
Response = MsgBox(prompt:="Do You want to clear the DELTA? 'Yes' or 'No'.", Buttons:=vbYesNo)
If Response <> vbYes Then Exit Sub
Dim SQLFutSoldat As Currency
SQLFutSoldat = InputBox("Enter Price Lifted at", "Lift Input Box", 0)
Dim cn As ADODB.Connection
Dim rs As ADODB.Recordset
Dim SQLServer As String
Dim Catalog As String
Dim SQLString As String
Dim SQLInvNo As String
Dim comboboxfut As Integer
comboboxfut = Me!Combo58
SQLServer = "Gretzky\RNYSQLAccess"
Catalog = "prototypedatabasecafe2010"
SQLString = "Exec sp_Deltaclear " & comboboxfut
'Create a new ADO Connection object
Set cn = New ADODB.Connection
'Use the Access 10 and SQL Server OLEDB providers to
'open the Connection
'You will need to replace MySQLServer with the name
'of a valid SQL Server
With cn
.Provider = "Microsoft.Access.OLEDB.10.0"
.Properties("Data Provider").Value = "SQLOLEDB"
.Properties("Data Source").Value = SQLServer
.Properties("Integrated Security").Value = "SSPI"
.Properties("Initial Catalog").Value = Catalog
.Open
End With
'Create an instance of the ADO Recordset class, and
'set its properties
Set rs = New ADODB.Recordset
With rs
Set .ActiveConnection = cn
.Source = SQLString
.LockType = adLockOptimistic
.CursorType = adOpenKeyset
.Open
End With
'Set the form's Recordset property to the ADO recordset
' Set Me.Recordset = rs
'Set rs = Nothing
'Set cn = Nothing
MsgBox ("Delta Cleared")
End Sub
Private Sub Command20_Click()
Me.Text35.Value = ""
Me.Text35.Value = Me.PriceBase
End Sub
Private Sub Command22_Click()
Dim Response As Integer
Response = MsgBox(prompt:="Do You want to clear the Gamma? 'Yes' or 'No'.", Buttons:=vbYesNo)
If Response <> vbYes Then Exit Sub
Dim SQLFutSoldat As Currency
SQLFutSoldat = InputBox("Enter Price Lifted at", "Lift Input Box", 0)
Dim cn As ADODB.Connection
Dim rs As ADODB.Recordset
Dim SQLServer As String
Dim Catalog As String
Dim SQLString As String
Dim SQLInvNo As String
Dim comboboxfut As Integer
comboboxfut = Me!Combo58
SQLServer = "Gretzky\RNYSQLAccess"
Catalog = "prototypedatabasecafe2010"
SQLString = "Exec sp_Gammaclear " & comboboxfut
'Create a new ADO Connection object
Set cn = New ADODB.Connection
'Use the Access 10 and SQL Server OLEDB providers to
'open the Connection
'You will need to replace MySQLServer with the name
'of a valid SQL Server
With cn
.Provider = "Microsoft.Access.OLEDB.10.0"
.Properties("Data Provider").Value = "SQLOLEDB"
.Properties("Data Source").Value = SQLServer
.Properties("Integrated Security").Value = "SSPI"
.Properties("Initial Catalog").Value = Catalog
.Open
End With
'Create an instance of the ADO Recordset class, and
'set its properties
Set rs = New ADODB.Recordset
With rs
Set .ActiveConnection = cn
.Source = SQLString
.LockType = adLockOptimistic
.CursorType = adOpenKeyset
.Open
End With
'Set the form's Recordset property to the ADO recordset
' Set Me.Recordset = rs
'Set rs = Nothing
'Set cn = Nothing
MsgBox ("Gamma Cleared")
Dim Response As Integer
Response = MsgBox(prompt:="Do You want to clear the DELTA? 'Yes' or 'No'.", Buttons:=vbYesNo)
If Response <> vbYes Then Exit Sub
Dim SQLFutSoldat As Currency
SQLFutSoldat = InputBox("Enter Price Lifted at", "Lift Input Box", 0)
Dim cn As ADODB.Connection
Dim rs As ADODB.Recordset
Dim SQLServer As String
Dim Catalog As String
Dim SQLString As String
Dim SQLInvNo As String
Dim comboboxfut As Integer
comboboxfut = Me!Combo58
SQLServer = "Gretzky\RNYSQLAccess"
Catalog = "prototypedatabasecafe2010"
SQLString = "Exec sp_Deltaclear " & comboboxfut
'Create a new ADO Connection object
Set cn = New ADODB.Connection
'Use the Access 10 and SQL Server OLEDB providers to
'open the Connection
'You will need to replace MySQLServer with the name
'of a valid SQL Server
With cn
.Provider = "Microsoft.Access.OLEDB.10.0"
.Properties("Data Provider").Value = "SQLOLEDB"
.Properties("Data Source").Value = SQLServer
.Properties("Integrated Security").Value = "SSPI"
.Properties("Initial Catalog").Value = Catalog
.Open
End With
'Create an instance of the ADO Recordset class, and
'set its properties
Set rs = New ADODB.Recordset
With rs
Set .ActiveConnection = cn
.Source = SQLString
.LockType = adLockOptimistic
.CursorType = adOpenKeyset
.Open
End With
'Set the form's Recordset property to the ADO recordset
' Set Me.Recordset = rs
'Set rs = Nothing
'Set cn = Nothing
MsgBox ("Delta Cleared")
End Sub
Private Sub Command20_Click()
Me.Text35.Value = ""
Me.Text35.Value = Me.PriceBase
End Sub
Private Sub Command22_Click()
Dim Response As Integer
Response = MsgBox(prompt:="Do You want to clear the Gamma? 'Yes' or 'No'.", Buttons:=vbYesNo)
If Response <> vbYes Then Exit Sub
Dim SQLFutSoldat As Currency
SQLFutSoldat = InputBox("Enter Price Lifted at", "Lift Input Box", 0)
Dim cn As ADODB.Connection
Dim rs As ADODB.Recordset
Dim SQLServer As String
Dim Catalog As String
Dim SQLString As String
Dim SQLInvNo As String
Dim comboboxfut As Integer
comboboxfut = Me!Combo58
SQLServer = "Gretzky\RNYSQLAccess"
Catalog = "prototypedatabasecafe2010"
SQLString = "Exec sp_Gammaclear " & comboboxfut
'Create a new ADO Connection object
Set cn = New ADODB.Connection
'Use the Access 10 and SQL Server OLEDB providers to
'open the Connection
'You will need to replace MySQLServer with the name
'of a valid SQL Server
With cn
.Provider = "Microsoft.Access.OLEDB.10.0"
.Properties("Data Provider").Value = "SQLOLEDB"
.Properties("Data Source").Value = SQLServer
.Properties("Integrated Security").Value = "SSPI"
.Properties("Initial Catalog").Value = Catalog
.Open
End With
'Create an instance of the ADO Recordset class, and
'set its properties
Set rs = New ADODB.Recordset
With rs
Set .ActiveConnection = cn
.Source = SQLString
.LockType = adLockOptimistic
.CursorType = adOpenKeyset
.Open
End With
'Set the form's Recordset property to the ADO recordset
' Set Me.Recordset = rs
'Set rs = Nothing
'Set cn = Nothing
MsgBox ("Gamma Cleared")