DataBase - Form changes contents on a timer - how to get it to skip if nil re
Asked By james
04-Feb-10 10:52 AM

Hi
The code below is for a form that changes contents on a timer. The contents
are received from a series of queries
Is there a way to make it so that if a query has nil results/records that it
automatically skips to the next Case/Query?
Cheers
James
_______________________________________________
Private Sub Form_Activate()
Me.TimerInterval = 5000
End Sub
Private Sub Form_Load()
Me.Child4.SourceObject = "Query.DisplayOrdersEURGBP"
Me.Label5.Caption = "EURGBP"
End Sub
Private Sub Form_Timer()
Select Case Me.Child4.SourceObject
Case "Query.DisplayOrdersEURGBP"
Me.Child4.SourceObject = "Query.DisplayOrdersEURUSD"
Me.Label5.Caption = "EURUSD"
Case "Query.DisplayOrdersEURUSD"
Me.Child4.SourceObject = "Query.DisplayOrdersGBPUSD"
Me.Label5.Caption = "GBPUSD"
Case "Query.DisplayOrdersGBPUSD"
Me.Child4.SourceObject = "Query.DisplayOrdersOther"
Me.Label5.Caption = "OTHER"
Case "Query.DisplayOrdersOther"
Me.Child4.SourceObject = "Query.DisplayOrdersEURGBP"
Me.Label5.Caption = "EURGBP"
End Select
End Sub
______________________________________________________
Query.DisplayOrdersEURUSD
(1)
Query.DisplayOrdersEURGBP
(1)
Query.DisplayOrdersGBPUSD
(1)
Query.DisplayOrdersOther
(1)
RecordsetClone.RecordCount
(1)
Rowsthere
(1)
EURGBP
(1)
GBPUSD
(1)