default value

  • Thread starter Thread starter Guest
  • Start date Start date
McCoy,
Use a DefaultValue of...
NZ(DMax(["[YourIDNo]", "tblYourTable")) + 1
--
hth
Al Campagna . Candia Computer Consulting . Candia, NH USA
Microsoft Access MVP
http://home.comcast.net/~cccsolutions

"Find a job that you love, and you'll never work a day in your life."
 
tnx for the response but i tried that expression already but still i got the
error thing!
my field property is set to TEXT and my inputmask is set to 99\-0##;0;_
does it have to do with the error?

Al Campagna said:
McCoy,
Use a DefaultValue of...
NZ(DMax(["[YourIDNo]", "tblYourTable")) + 1
--
hth
Al Campagna . Candia Computer Consulting . Candia, NH USA
Microsoft Access MVP
http://home.comcast.net/~cccsolutions

"Find a job that you love, and you'll never work a day in your life."

mccoy said:
id like to set the default value from the previous record +1 just like in
autonumber
 
McCoy,
Yes...
Text has no DMax.
What part of 99\-0##;0 is incremented? Please give some examples, and explain what
the logic is behind the 99 and the 0##. Then we can better determine how to handle this.

--
hth
Al Campagna . Candia Computer Consulting . Candia, NH USA
Microsoft Access MVP
http://home.comcast.net/~cccsolutions

"Find a job that you love, and you'll never work a day in your life."

mccoy said:
tnx for the response but i tried that expression already but still i got the
error thing!
my field property is set to TEXT and my inputmask is set to 99\-0##;0;_
does it have to do with the error?

Al Campagna said:
McCoy,
Use a DefaultValue of...
NZ(DMax(["[YourIDNo]", "tblYourTable")) + 1
--
hth
Al Campagna . Candia Computer Consulting . Candia, NH USA
Microsoft Access MVP
http://home.comcast.net/~cccsolutions

"Find a job that you love, and you'll never work a day in your life."

mccoy said:
id like to set the default value from the previous record +1 just like in
autonumber
 
ur response is very much appreciated! thank you

ive set the field to property to TEXT because zero is now allowed to be the
first character in NUMBER property
my field data is like this eg; 07-1 up to 07-9999

Al Campagna said:
McCoy,
Yes...
Text has no DMax.
What part of 99\-0##;0 is incremented? Please give some examples, and explain what
the logic is behind the 99 and the 0##. Then we can better determine how to handle this.

--
hth
Al Campagna . Candia Computer Consulting . Candia, NH USA
Microsoft Access MVP
http://home.comcast.net/~cccsolutions

"Find a job that you love, and you'll never work a day in your life."

mccoy said:
tnx for the response but i tried that expression already but still i got the
error thing!
my field property is set to TEXT and my inputmask is set to 99\-0##;0;_
does it have to do with the error?

Al Campagna said:
McCoy,
Use a DefaultValue of...
NZ(DMax(["[YourIDNo]", "tblYourTable")) + 1
--
hth
Al Campagna . Candia Computer Consulting . Candia, NH USA
Microsoft Access MVP
http://home.comcast.net/~cccsolutions

"Find a job that you love, and you'll never work a day in your life."

id like to set the default value from the previous record +1 just like in
autonumber
 
Back
Top