So in my database i'm creating a live form that will open up a list of patients and when they are seen. one of the bits is a button that before they arrive says "Not Arrived" and after they arrive it says "Arrived". The code works fine:
The problem is after clicking the button on any of the records, it changes the text on all records, to wit:
Edit: I tried to attach images or links to images, but my post-count is too low. The before-click screenshot is /3QnBkgG on imgur. The after-click screenshot is 9VZWzzp on the same site.
Bear in mind I've only clicked the button (it's white, so it doesn't look like a button) on the top record.
The form is set to continuous forms, not sure if that has anything to do with it.
Anyone know how I can get the code to run on individual records, rather than applying the first-record's results across all records?
Thanking in advance.
Code:
Private Sub Command68_Click()
Dim C1 As String
Dim C2 As String
C1 = "Not Arrived"
C2 = "ARRIVED"
With Me.Command68
If .Caption = C1 Then
.Caption = C2
ElseIf .Caption = C2 Then
.Caption = C1
End If
End With
End Sub
The problem is after clicking the button on any of the records, it changes the text on all records, to wit:
Edit: I tried to attach images or links to images, but my post-count is too low. The before-click screenshot is /3QnBkgG on imgur. The after-click screenshot is 9VZWzzp on the same site.
Bear in mind I've only clicked the button (it's white, so it doesn't look like a button) on the top record.
The form is set to continuous forms, not sure if that has anything to do with it.
Anyone know how I can get the code to run on individual records, rather than applying the first-record's results across all records?
Thanking in advance.