Help with DMax procedure

  • Thread starter Thread starter Spidey3721
  • Start date Start date
S

Spidey3721

Making a service call tracking database. Have one form ([service call form])
that shows outstanding service calls - this form has a button that is to
bring up a form where I can enter in a new incident associated with that
service call

Example - Service call # = 301.003 (ServiceCallID) (text)
Associated service call incidents = 301.003.01; 301.003.02;
etc...(IncidentID) (text)

I am trying to get a procedure in the second form to calculates the max
IncidentID (which is text) where the first 3 number characters match the
first 3 number characters of the ServiceCallID textbox ([ServiceCallID
text]) from the first Form...

CODE:

StrMax = Nz(DMax("[IncidentID]", "[Service call incident
table]",Left([IncidentID],3) = Left (Forms![service call
form].[ServiceCallID text],3) , 0))


I am trying to get a textbox value in an input form to defualt to the next
incremetal value that is available for
 
Spidey3721 said:
Making a service call tracking database. Have one form ([service call
form]) that shows outstanding service calls - this form has a button
that is to bring up a form where I can enter in a new incident
associated with that service call

Example - Service call # = 301.003 (ServiceCallID) (text)
Associated service call incidents = 301.003.01; 301.003.02;
etc...(IncidentID) (text)

I am trying to get a procedure in the second form to calculates the
max IncidentID (which is text) where the first 3 number characters
match the first 3 number characters of the ServiceCallID textbox
([ServiceCallID text]) from the first Form...

CODE:

StrMax = Nz(DMax("[IncidentID]", "[Service call incident
table]",Left([IncidentID],3) = Left (Forms![service call
form].[ServiceCallID text],3) , 0))


I am trying to get a textbox value in an input form to defualt to the
next incremetal value that is available for

Answered in a different newsgroup to which you posted this same question
independently. That's called "multiposting", and it's generally frowned
on because others don't know what answers have already been given, and
so they duplicate the effort. Also it's harder for you to keep track of
the various replies, and it's harder for later readers of the question,
who may be looking for the same answer, to learn what they need.

In most cases a single, well-chosen newsgroup will do. If your question
really is relevant to more than one newsgroup, the approved technique is
to "crosspost" it instead, by listing multiple newsgroups in the To: or
Newsgroups: line of a single message. If you do that, the message and
any replies will appear in all the listed newsgroups automatically,
which is beneficial to all concerned.
 
My bad...

Thank you for the tip. It all makes very good sense.





Dirk Goldgar said:
Spidey3721 said:
Making a service call tracking database. Have one form ([service call
form]) that shows outstanding service calls - this form has a button
that is to bring up a form where I can enter in a new incident
associated with that service call

Example - Service call # = 301.003 (ServiceCallID) (text)
Associated service call incidents = 301.003.01; 301.003.02;
etc...(IncidentID) (text)

I am trying to get a procedure in the second form to calculates the
max IncidentID (which is text) where the first 3 number characters
match the first 3 number characters of the ServiceCallID textbox
([ServiceCallID text]) from the first Form...

CODE:

StrMax = Nz(DMax("[IncidentID]", "[Service call incident
table]",Left([IncidentID],3) = Left (Forms![service call
form].[ServiceCallID text],3) , 0))


I am trying to get a textbox value in an input form to defualt to the
next incremetal value that is available for

Answered in a different newsgroup to which you posted this same question
independently. That's called "multiposting", and it's generally frowned
on because others don't know what answers have already been given, and
so they duplicate the effort. Also it's harder for you to keep track of
the various replies, and it's harder for later readers of the question,
who may be looking for the same answer, to learn what they need.

In most cases a single, well-chosen newsgroup will do. If your question
really is relevant to more than one newsgroup, the approved technique is
to "crosspost" it instead, by listing multiple newsgroups in the To: or
Newsgroups: line of a single message. If you do that, the message and
any replies will appear in all the listed newsgroups automatically,
which is beneficial to all concerned.

--
Dirk Goldgar, MS Access MVP
www.datagnostics.com

(please reply to the newsgroup)
 
Back
Top