T
terry
I have a form with one field in it called CondolenceID and 1 list box called
myctl
below is the code I am using to select a report from the list box the
problem is it works some time and then other times it prints all records or
the form its self
Any ideas why it is intermiting ?
Private Sub Command24_Click()
Dim StrWhere As String
StrWhere = "[condolenceID]=""" & Me!CondolenceID & """"
Dim VarItm As Variant
For Each VarItm In myctl.ItemsSelected
DoCmd.OpenReport myctl.ItemData(VarItm), acPreview, , StrWhere
Next
End Sub
myctl
below is the code I am using to select a report from the list box the
problem is it works some time and then other times it prints all records or
the form its self
Any ideas why it is intermiting ?
Private Sub Command24_Click()
Dim StrWhere As String
StrWhere = "[condolenceID]=""" & Me!CondolenceID & """"
Dim VarItm As Variant
For Each VarItm In myctl.ItemsSelected
DoCmd.OpenReport myctl.ItemData(VarItm), acPreview, , StrWhere
Next
End Sub