default value

G

Guest

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

Al Campagna

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."
 
G

Guest

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
 
A

Al Campagna

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
 
G

Guest

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
 

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