All I have run into an issue with my database.
My DB is running on a Citrix box and I have recently found that I am getting records slip through duplicate record trap.
This means that the trap has missed a date that appears entered 09/08/2005
and yet if I entered 08/09/2005 on my form it is picked up.
This has raised issues with integrity of existing data in the DB as I have found that several users have had their Locale settings (on the Citrix box) set to US as opposed to United Kingdom.
I need to
1: Impose a rule that will mean all data in the tables is entered correct irespective of locale setting.
2: If storage of my date is not a problem (and it is the duplicate trap script instead?) rectify that so that it will be able to deal with the issue.
3: Establish the damage to the integrity of my existing data and rectify where possible.....
Any idea?
My DB is running on a Citrix box and I have recently found that I am getting records slip through duplicate record trap.
Code:
Private Sub Date_AfterUpdate()
If Not IsNull(DLookup("[UNITID]", "[tbl_BCCInspection]", "[UNITID]='" & Forms![frm_BCCInspectInput]![UNITID] & "'")) And Not IsNull(DLookup("[date]", "[tbl_BCCInspection]", "[date]=#" & Forms![frm_BCCInspectInput]![date] & "#")) Then
If Me.NewRecord Then
Select Case MsgBox("This is a duplicate record! Do you wish to DELETE this record?", vbYesNo + vbQuestion, "THIS IS A DUPLICATE RECORD")
Case vbYes: 'Delete the record
Me.UNITID.SetFocus
DoCmd.RunCommand acCmdUndo
Me.tbProperSave.Value = "No"
MsgBox "The duplicate has been deleted!"
Case vbNo: 'Do NOT delete the record
DoCmd.CancelEvent
MsgBox "You are continuing input of a duplicate record!"
Case Else: 'Trap any other errors that could occur
'Do Nothing
End Select
End If
End If
End Sub
This means that the trap has missed a date that appears entered 09/08/2005
and yet if I entered 08/09/2005 on my form it is picked up.
This has raised issues with integrity of existing data in the DB as I have found that several users have had their Locale settings (on the Citrix box) set to US as opposed to United Kingdom.
I need to
1: Impose a rule that will mean all data in the tables is entered correct irespective of locale setting.
2: If storage of my date is not a problem (and it is the duplicate trap script instead?) rectify that so that it will be able to deal with the issue.
3: Establish the damage to the integrity of my existing data and rectify where possible.....
Any idea?