Hi,
I'm trying to make a double data entry form in ACCESS. From my internet research, I know that I can create 2 different forms, with the 2nd one unbound to the table, and then write codes to compare. But that's where I'm stucked.
I have the
1. Phlebotomy_Lab_Data_Entry table, where the information is located
2. Phlebotomy_Lab_1st_Data_Entry, which is linked to Phlebotomy_Lab_Data_Entry table
3. Phlebotomy_Lab_2nd_Data_Entry, in which all textboxes are the same as Phlebotomy_Lab_1st_Data_Entry, but unbound
I tried to write a code in the BeforeUpdate event on each of the textbox in the 2nd data entry form to compare with the table. Here is an example for the WBC textbox
Private Sub WBC_BeforeUpdate(Cancel As Integer)
If Forms![Phlebotomy_Lab_2nd_Data_Entry]![WBC].Value = Phlebotomy_Lab_Data_Entry.WBC Then
Exit Sub
Else
MsgBox "Unmatched, please check entry.", vbOKOnly
Cancel = True
Me!WBC.Undo
End If
End Sub
But it kept not working! Do you have any idea what i was doing wrong in the code?
Thank you so much,
Meo