By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,360 Members | 2,961 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,360 IT Pros & Developers. It's quick & easy.

Generating Numbers

P: n/a
I am creating a certain program and in that program i want to add a
field which will be creating numbers with text in sequence older "
Like MPL 001/08 to unlimited " And 08 be current year. This will only
be possible if that field is enebled, if the condition of enebling
this field still is false then the field returns the previous value
that is it maintances the previous record number.

please assist as soon as possible
Aug 11 '08 #1
Share this Question
Share on Google+
3 Replies


P: n/a
On Aug 11, 8:43*am, mphil.s...@gmail.com wrote:
I am creating a certain program and in that program i want to add a
field which will be creating numbers with text in sequence older "
Like MPL 001/08 *to unlimited " And 08 be current year. This will only
be possible if that field is enebled, if the condition of enebling
this field still is false then the field returns the previous value
that is it maintances the previous record number.

please assist as soon as possible
I'd start by creating that field on the fly from 3 fields... rather
than storing that field as a single value.

What I mean is, have 3 fields.
TypeText
Counter
CurrentYear

Display of these values would then be:
[TypeText] & " " & format([Counter],"000") & "/" & [CurrentYear]

Then, you can apply logic on the values in the various fields.

You'll have to ask the question differently to get help with applying
the logic.

Jon
Aug 11 '08 #2

P: n/a
On Aug 11, 10:24*pm, jonceramic <joncera...@gmail.comwrote:
On Aug 11, 8:43*am, mphil.s...@gmail.com wrote:
I am creating a certain program and in that program i want to add a
field which will be creating numbers with text in sequence older "
Like MPL 001/08 *to unlimited " And 08 be current year. This will only
be possible if that field is enebled, if the condition of enebling
this field still is false then the field returns the previous value
that is it maintances the previous record number.
please assist as soon as possible

I'd start by creating that field on the fly from 3 fields... rather
than storing that field as a single value.

What I mean is, have 3 fields.
TypeText
Counter
CurrentYear

Display of these values would then be:
[TypeText] & " " & format([Counter],"000") & "/" & [CurrentYear]

Then, you can apply logic on the values in the various fields.

You'll have to ask the question differently to get help with applying
the logic.

Jon
Thanks for your help but all am interested with is generation of
numbers or let me put it this way What can i do to autonumber field so
that each time i cancel the updation it maintains its original number
not creating another number
Aug 12 '08 #3

P: n/a
mp********@gmail.com wrote:
On Aug 11, 10:24 pm, jonceramic <joncera...@gmail.comwrote:
>>On Aug 11, 8:43 am, mphil.s...@gmail.com wrote:

>>>I am creating a certain program and in that program i want to add a
field which will be creating numbers with text in sequence older "
Like MPL 001/08 to unlimited " And 08 be current year. This will only
be possible if that field is enebled, if the condition of enebling
this field still is false then the field returns the previous value
that is it maintances the previous record number.
>>>please assist as soon as possible

I'd start by creating that field on the fly from 3 fields... rather
than storing that field as a single value.

What I mean is, have 3 fields.
TypeText
Counter
CurrentYear

Display of these values would then be:
[TypeText] & " " & format([Counter],"000") & "/" & [CurrentYear]

Then, you can apply logic on the values in the various fields.

You'll have to ask the question differently to get help with applying
the logic.

Jon


Thanks for your help but all am interested with is generation of
numbers or let me put it this way What can i do to autonumber field so
that each time i cancel the updation it maintains its original number
not creating another number
My first suggestion is to never add a record into a table that has is
bound to a table with an autonumber.

Second suggestion is to create an unbound form to enter data and never
add it to the table unless the person presses a Save button and is
willing to commit that record.

Third suggestion is to use a LongInt and scrap your autonumber and
create a method to update the field.

If you need sequence, don't use Autonumbers. People that use
autonumbers don't give a flying F about sequences.
Aug 12 '08 #4

This discussion thread is closed

Replies have been disabled for this discussion.