I have a SQL Server stored procedure created in a module.
I want one of the parameters to come from a combo box in one of the forms. But I can't seem to get access to the form. When ever I type if Forms!Myform. I dont get any drop down options from VBA.
Here is a small part of my code:
Set objCommand = New Command
objCommand.ActiveConnection = sConnectSQL
objCommand.CommandText = "VRSelection_Screen"
objCommand.CommandType = adCmdStoredProc
'objCommand.Parameters.Refresh
objCommand(1) = "1.2"
objCommand(2) = "0.02"
objCommand(3) = "30"
objCommand(4) = Forms!vr_selection.filter_calendartype.Value 'CalendarType
objCommand(5) = "2013"
objCommnad(4) does not work.
Thanks
I want one of the parameters to come from a combo box in one of the forms. But I can't seem to get access to the form. When ever I type if Forms!Myform. I dont get any drop down options from VBA.
Here is a small part of my code:
Set objCommand = New Command
objCommand.ActiveConnection = sConnectSQL
objCommand.CommandText = "VRSelection_Screen"
objCommand.CommandType = adCmdStoredProc
'objCommand.Parameters.Refresh
objCommand(1) = "1.2"
objCommand(2) = "0.02"
objCommand(3) = "30"
objCommand(4) = Forms!vr_selection.filter_calendartype.Value 'CalendarType
objCommand(5) = "2013"
objCommnad(4) does not work.
Thanks