Sequential numbering

Diana van den Berg
4StarLounger
Posts: 582
Joined: 06 May 2012, 20:05

Sequential numbering

Post by Diana van den Berg »

I would like to use sequential numbering in a form - for generating numbers for e.g. invoices, jobcard numbers, etc.

I have used something in the past, but have forgotten how to use it. I have attached a sample zipped database with it in, but I can't remember what else I have to do to it.

Thank you for any help.
You do not have the required permissions to view the files attached to this post.
Last edited by Diana van den Berg on 01 Mar 2014, 21:34, edited 2 times in total.

User avatar
Rudi
gamma jay
Posts: 25455
Joined: 17 Mar 2010, 17:33
Location: Cape Town

Re: Sequential numbering

Post by Rudi »

Hi,

Something to reference until you get some more detailed help... :smile:
Regards,
Rudi

If your absence does not affect them, your presence didn't matter.

Diana van den Berg
4StarLounger
Posts: 582
Joined: 06 May 2012, 20:05

Re: Sequential numbering

Post by Diana van den Berg »

Thank you, Rudi. That is kind of you. However, I did see that when I looked up on the Internet. I don't 'speak' code, so I need more help than that.

I know that what I attached is close to working, so I will just wait until somebody can help me with that or similar.

User avatar
HansV
Administrator
Posts: 78586
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Sequential numbering

Post by HansV »

Why don't you simply use an AutoNumber field? No code needed, Access will handle it all for you.
Best wishes,
Hans

Diana van den Berg
4StarLounger
Posts: 582
Joined: 06 May 2012, 20:05

Re: Sequential numbering

Post by Diana van den Berg »

Because, in this case, it is for a Jobcard Number that the user wants to control - and in other cases it is for an invoice number.

I have got this a little bit better now. I am going to delete the previous attachment and attach the one with the improvement.

Thank you.

User avatar
HansV
Administrator
Posts: 78586
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Sequential numbering

Post by HansV »

There is no need to open frmSeeds. You only need to open frmSeeds when you want to set the initial value for RecNo.

This should be sufficient:

Code: Select all

Private Sub GenerateRecNo_Click()
    Me.RecNo.DefaultValue = """" & GetRecNo & """"
End Sub
Best wishes,
Hans

Diana van den Berg
4StarLounger
Posts: 582
Joined: 06 May 2012, 20:05

Re: Sequential numbering

Post by Diana van den Berg »

What I was trying to use previously was a problematic edited version of what is in Roger Carlson's link below.

The original (which I was sent some years back) but didn't look at until now, is perfect for my use. I am putting it in here in case anyone else can make use of it.

What I am using it for now is Jobcard numbers and Invoice numbers that a user wants to be automatic, but editable for any reason.

Roger Carlson has a simple solution for this, catering for both single and multi-user environments, at:

http://www.rogersaccesslibrary.com/forum/topic395.html" onclick="window.open(this.href);return false;

Both are simple and excellent, but the multi-user one is so simple, I would be inclined to use that one even for single users - in case those single users become multiple users and if single-users was decided on initially, the developer may forget that it would have to be changed and then the multi-users could land up with duplicate numbers.

Thank you Hans for your help.

User avatar
HansV
Administrator
Posts: 78586
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Sequential numbering

Post by HansV »

Thanks for the update!
Best wishes,
Hans

Diana van den Berg
4StarLounger
Posts: 582
Joined: 06 May 2012, 20:05

Re: Sequential numbering

Post by Diana van den Berg »

My pleasure! :smile: