Peter, Thanks, I had thought you could do that but when I tried to use that method to set a parameter directly in an ADODB Command, it didn't work, I had to first declare a variable, then set the variable to the keyvalue, then I used the variable in the Command.
Does Not work
Dim cmd as New ADODB.Command
With cmd
.Parameters(@MyKeyValue") = Me.MyKeyValue
Does Work:
Dim myKeyValue as integer
myKeyValue = Me.MyKeyValue
Dim cmd as New ADODB.Command
With cmd
.Parameters(@MyKeyValue") = myKeyValue
Does Not work
Dim cmd as New ADODB.Command
With cmd
.Parameters(@MyKeyValue") = Me.MyKeyValue
Does Work:
Dim myKeyValue as integer
myKeyValue = Me.MyKeyValue
Dim cmd as New ADODB.Command
With cmd
.Parameters(@MyKeyValue") = myKeyValue