Click here to Skip to main content
16,004,647 members

Comments by Merscy (Top 10 by date)

Merscy 21-Aug-20 1:44am View    
Yeah sorry, I forgot to tell. It does have a binding with access.
Merscy 11-Aug-20 18:22pm View    
Hey there,

Thank you. I think all is good but there is an error within the timer, which I'm guessing it's because I did those coding before I did all this. What do you think I should do about it?

Here is the code:

Private Sub tmrMonitor_Tick(sender As Object, e As EventArgs) Handles tmrMonitor.Tick
Dim dt As DataTable = frmViewAllData.GetdgvUserData
tmrMonitor.Stop()
Dim a As Integer
If counter < dgvUserData.RowCount Then
Integer.TryParse(dgvUserData.Rows(counter).Cells(0).Value, a)

lblPulseValue.Text = a.ToString()
If (a > max) Then
MessageBox.Show("High")
ElseIf (a < min) Then
tmrMonitor.Stop()
MessageBox.Show("Low")
End If
tmrMonitor.Start()
counter = counter + 1
chrtDaily.Series("Beats Per Minute").Points.AddY(a.ToString)
Else
tmrMonitor.Stop()
End If
End Sub

These lines were the ones with the error:

If counter < dgvUserData.RowCount Then
Integer.TryParse(dgvUserData.Rows(counter).Cells(0).Value, a)

The error is with the dgvUserData ones and I tried replacing them with dt but that didn't help as well...
Merscy 11-Aug-20 8:18am View    
oh yes, I get you. In that case, the second form is frmViewAllData. As you need to press a button in frmMonitorHeartRate to get to frmViewAllData, and in the first form (frmMonitorHeartRate) I did:

Private Sub btnViewAllData_Click(sender As Object, e As EventArgs) Handles btnViewAllData.Click
frmViewAllData.Show()
End Sub

However, just so you know, I also do have a main menu form which just takes the user to both frmMonitorHeartRate and frmViewAllData.
Merscy 11-Aug-20 7:17am View    
Oh yes, I understand what you mean but I can't find anything like that. Sorry, I feel so dumb, was I meant to implement that in or is it meant to already be there? Because if I was meant to implement that in, it would give me an error and if it was meant to be already there well then I couldn't find it...
Merscy 11-Aug-20 6:32am View    
Wait are these things that you talk about in visual basics?? I have a feeling you're talking in C# and they may be different in that aspect...