No, just does not update the CustNumber, keeps just adding 10000 as the next
number
"Rick Brandt" <(E-Mail Removed)> wrote in message
news:T4buf.43721$(E-Mail Removed)...
> LJG wrote:
>> Hi Guys,
>>
>> Any idea why this code does not work?
>>
>> Private Sub Form_BeforeInsert(Cancel As Integer)
>> Me!txtID = Nz(DMax("[CustNumber]", "[tblContacts]")) + 1
>> End Sub
>>
>> Have used it before in another form and works fine, object & table
>> names are correct
>
> What "doesn't work" about it? Do you get an error?
>
> --
> I don't check the Email account attached
> to this message. Send instead to...
> RBrandt at Hunter dot com
>
|