Forms

  • Thread starter Thread starter Froto
  • Start date Start date
F

Froto

Need some help with the following code.

I have placed this code in the default value box of my
textbox.

Nz(DMax("UserID","Elemental Analysis Request Tbl"))+1

What I would like to see in the textbox is once form is
opened, it would place the following. Jan-0001, Jan-0002.
Right now all that I'm getting is the number like 1, 2 3
etc. I don't want to use the autonumber feature. Any help
would be appreciated.

Thank you
 
Need some help with the following code.

I have placed this code in the default value box of my
textbox.

Nz(DMax("UserID","Elemental Analysis Request Tbl"))+1

What I would like to see in the textbox is once form is
opened, it would place the following. Jan-0001, Jan-0002.
Right now all that I'm getting is the number like 1, 2 3
etc. I don't want to use the autonumber feature. Any help
would be appreciated.

Thank you

Set the Format property of the text box to

"Jan-"0000

Is Jan a constant prefix? or does it mean January, and you want the
next set of records to be Feb-0001 and so on? If so you'll need two
fields and a bit more code!
 
-----Original Message-----


Set the Format property of the text box to

"Jan-"0000

Is Jan a constant prefix? or does it mean January, and you want the
next set of records to be Feb-0001 and so on? If so you'll need two
fields and a bit more code!


.
John

Yes the Jan stands for month and I will need it to change
to the appropriate month. What bit of code would I need
to accomplish this

Thank you for your reply
 
Need some help with the following code.

I have placed this code in the default value box of my
textbox.

Nz(DMax("UserID","Elemental Analysis Request Tbl"))+1

What I would like to see in the textbox is once form is
opened, it would place the following. Jan-0001, Jan-0002.
Right now all that I'm getting is the number like 1, 2 3
etc. I don't want to use the autonumber feature. Any help
would be appreciated.

Thank you

OK... downthread you say you want to include the month in the ID.

THIS IS A VERY BAD IDEA.

Will the database be discarded at the end of December? If not, what
would be the first record entered in January 2005?

Storing multiple pieces of information in one field is called an
"intelligent key". This is *not* complimentary; the intelligence
should reside elsewhere, not in the key.

Why is it necessary to store data - a month - in the ID? What field
are you storing this in - UserID? If this is for compatibility with an
existing manual system, how does that system deal with January in
different years?
 
Back
Top