Hi, I wonder if someone might be able to give me a nudge in the right direction please.
I am trying to populate a dblist box using the following bit of code :
Hoever when it gets to the Set .RowSource line, it fails saying:
Run-time error 91
Object variable or With block variable not set.
I don't understand what is going wrong as I have copied the code from another part of the same database which does work
, only changing the ScriptRS name.
Data is being retrieved into the recordset, I have established that much!
Please help while I still have hair.
Cheers
Chris
I am trying to populate a dblist box using the following bit of code :
Code:
Set ScriptRS = objcomm.Execute("get_PrescriptionDetailsListBox", pr_Parameter, adCmdStoredProc)
With dblScript
Set .RowSource = ScriptRS
.ListField = "Script"
.BoundColumn = "DetailID"
End With
Hoever when it gets to the Set .RowSource line, it fails saying:
Run-time error 91
Object variable or With block variable not set.
I don't understand what is going wrong as I have copied the code from another part of the same database which does work
Data is being retrieved into the recordset, I have established that much!
Please help while I still have hair.
Cheers
Chris