There are a couple of issues with your code.
1st Issue: I am positive you do not have
Code:
Option Compare Databaset '<<---- These two lines should be at the top of EVERY module
Option Explicit '<<---- These two lines should be at the top of EVERY module
since you do not have your variables declared.
2nd Issue: You do not have your variables declared.
I guessed at some of the variable types - since you did not provide examples of the data, I had to guess.
Here is the modified code. It is untested, but it should work.
Code:
Option Compare Databaset '<<---- These two lines should be at the top of EVERY module
Option Explicit '<<---- These two lines should be at the top of EVERY module
Private Sub AUID_AfterUpdate()
Dim X As String
Dim Xsize As Integer
Dim i As Integer
Dim Found_in_filedno As Long
'msgbox variables
Dim Title As String
Dim Msg As String
Dim Style As Long
Dim Response As Integer
' Debug.Print Me.AUID
X = Split(Me.AUID, ", ")
Xsize = UBound(X, 1) - LBound(X, 1) + 1
For i = 1 To Xsize
Debug.Print X(i - 1)
Found_in_filedno = DLookup("[AUID]", "QIndexTbl", "instr([AUID], '" & X(i - 1) & "')>0")
If Found_in_filedno > 0 Then
' MsgBox ("One or more Versus " & X(i - 1) & " found repeated, please Remove it")
Msg = "One or more Versus " & X(i - 1) & " found repeated, please Remove it" ' Define message.
Style = vbOKOnly ' Define buttons.
Title = "AUID Error!!" ' Define title.
Response = MsgBox(Msg, Style, Title) ' Display message.
Next
End Sub
Change the RED text in the code above to the Title you want.
And Welcome to the forum........