Hi All
Despite HOURS of one-on-one training on how to prevent the capturing duplicate records, I am still called on a weekly basis to merge the information of two students (Who are in fact the SAME person)
Consequently, I am developing an unbound Parent form (FRM_DUP_Student) that contains 2 combo-boxes (Stu_To_Keep and Stu_To_Loose) and two subforms (FRM_Stu_KEEP and FRM_STU_LOoSE).
Each of the subforms is bound to a query that is sourcing its info from the STUDENT table.
The idea is that the user will select the Student that they want to 'keep' and the one that they want to merge from.
The subforms then display the respective data.
The user is then able to compare the data between the two subforms.
Its at this point that I would like to highlight to the user, what data will be 'lost' when they click a 'MERGE' button.
In the ON-current event of the FRM_STU_LOoSE form I am trying this.
Thanks & Regards
Despite HOURS of one-on-one training on how to prevent the capturing duplicate records, I am still called on a weekly basis to merge the information of two students (Who are in fact the SAME person)
Consequently, I am developing an unbound Parent form (FRM_DUP_Student) that contains 2 combo-boxes (Stu_To_Keep and Stu_To_Loose) and two subforms (FRM_Stu_KEEP and FRM_STU_LOoSE).
Each of the subforms is bound to a query that is sourcing its info from the STUDENT table.
The idea is that the user will select the Student that they want to 'keep' and the one that they want to merge from.
The subforms then display the respective data.
The user is then able to compare the data between the two subforms.
Its at this point that I would like to highlight to the user, what data will be 'lost' when they click a 'MERGE' button.
In the ON-current event of the FRM_STU_LOoSE form I am trying this.
Code:
Private Sub Form_Current()
Dim Ctl As Control
Dim MyLoose As Variant
Dim MyKeep As Variant
Dim MyType As String
Dim CName As String
For Each Ctl In Me.Controls
MyType = Ctl.ControlType
CName = Ctl.Name
Select Case MyType
Case 106, 109, 111 ' CheckBox, Textbox, Combobox
MyKeep = DLookup(CName, "QRY_DUP_Stu_Keep")
MyLoose = DLookup(CName, "QRY_Dup_STU_Loose")
'SO....How do I set the backcolor here as this produces a "438 - Object not supported" error?
If MyKeep <> MyLoose Then
'Ctl.backcolour = vbRed
Else
'Ctl.backcolour = vbWhite
End If
End Select
Next
End Sub
Thanks & Regards