Repost--- Help with Forms

  • Thread starter Thread starter Tina
  • Start date Start date
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.
 
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
 
Back
Top