Repost--- Help with Forms

T

Tina

Subject: Re: Help with Forms
From: "Tina" <[email protected]>
Sent: 2/2/2004 10:30:03 AM




I printed off the info from help, but I am confused as to
how I do DMax +1 or where I'd exactly put the code. Since
I have to wait for the Customer Id to be entered, I'm
assuming I would put the DMax code in the After Update.
Is that correct?

Once I type in the Customer Id, I want the next available
System Id to be filled in on the form so it can be added.
So it would be whatever the last record for that customer
plus 1.
 
P

Pavel Romashkin

I think the person who replied to you meant that you need to put the
following in the AfterUpdate for the CustomerID text box:

SystemID = DMax("SystemID", "MyTable", "CustomerID = '" & Me.CustomerID
& "'") + 1

This will guarantee that SystemIDs will NOT be unique in the table, but
the combinations of CustomerID and SystemID will be unique.
Good luck,
Pavel
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top