dcount + instr (1 Viewer)

Jackske

Registered User.
Local time
Today, 16:35
Joined
Feb 28, 2000
Messages
48
About the DCount function.
Dcount (“[Field]”, “Table”, “criteria”)

I am calling this function from a form while I am adding a record.
I use the criteria argument to compare if the ‘Name’ in my table is = ‘Name’ in my form.
The syntax of the criteria is “[Name]=[forms]![frmMembers].[Form]![Name]”
It works perfectly as long that both as identical.

Now I would like to change the code in order to check if the first 3 letters of Name (in the table) appears in Name (in the form).
I did try to use Instr without any success.

Thanks for any help
 

shay

Registered User.
Local time
Today, 14:35
Joined
Apr 29, 2002
Messages
169
Try

criteria = Instr(1, {NameOnForm}, left({NameInTable},3)) >0

shay :cool:
 

Users who are viewing this thread

Top Bottom