One form calling another form

E

esperanza

Hello dotnet expert,

this method never exit.

It call frm.show without exiting the sub.

Any Idea ??

Thanks in advance !



Private Sub TimerReminder_Tick(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles TimerReminder.Tick

If chkReminder.Checked = True Then

dsReminder.Clear()

dsReminder =
objAppointments.loadAppointmentsToBeReminder(System.DateTime.Today.ToString(
))

Dim SelRow As Integer

Dim SelCol As Integer

Try

For SelRow = dsReminder.Tables("Appointments").Rows.Count() - 1 To 0 Step -1

Dim frm As frmAlarm = New frmAlarm

frm.lblClient.Text =
dsReminder.Tables.Item(0).Rows(SelRow).Item("Client").ToString()

frm.lblDoctor.Text =
dsReminder.Tables.Item(0).Rows(SelRow).Item("Doctor").ToString()

frm.lblTel.Text =
dsReminder.Tables.Item(0).Rows(SelRow).Item("Tel").ToString()

frm.lblDate.Text =
dsReminder.Tables.Item(0).Rows(SelRow).Item("Dates").ToString()

frm.lblDescription.Text =
dsReminder.Tables.Item(0).Rows(SelRow).Item("Description").ToString()

frm.Show()

If SelRow = 0 Then

Exit Sub

End If

Next

Catch ex As Exception

MessageBox.Show(ex.Message)

End Try

End If

End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top