Hello,
I'm practising using DAO to create table, field etc. by following an access programming book
In a part of codes I copied from a hand-on file of the book...
Code:
Set fld = tblNew.CreateField("AgentID", dbText, 6)
fld.ValidationRule = "Like 'A*'"
fld.ValidationText = "Agent ID must begin with the " & _
"letter 'A' and cannot contain more than 6 characters."
tblNew.Fields.Append fld
As you can see that the validation rule is Like 'A*'. However, When switching to
the access interface, the validation rule is ALike 'A*' (where does the A come from?).
And when typing in an AgentID field's cell, it showed a message box of the validation text even though
I typed 'A' as the first letter.
Does anyone know how to solve the problem?
Thank you.