create a sequence number

T

Thomas

Hello in my database I was using the
autonumber for a SortNumber Increment.
I replicated the database and in the process
the AutoNumber was converted into a random
number. I read it would change the value but
I thought it meant field size to ReplicationID.
At any rate does anyone have code that
would create Value +1 to the SortNumber TextBox.
98
99
100
I have to add it myself now.

If I could just add code to the AfterUpDate event
of my ComboBox. I have tried modifying some posts
I have found here in the news group to fit my needs
but this don't work


Private Sub ServicesID_AfterUpdate()

Dim strMax As String
strMax = ("SortNumber")
Me!SortNumber = "SortNumber" & Right(strMax, Len(strMax) - InStr(1, strMax,
"-")) + 1

End Sub

Any input much appreciated
Thanks in advance
Tom
 
J

John Vinson

Hello in my database I was using the
autonumber for a SortNumber Increment.
I replicated the database and in the process
the AutoNumber was converted into a random
number. I read it would change the value but
I thought it meant field size to ReplicationID.
At any rate does anyone have code that
would create Value +1 to the SortNumber TextBox.
98
99
100
I have to add it myself now.

In a replicated database this is going to be a real problem! Normally
in a replica, you will have multiple disconnected users updating data
independently, and at some point you will synchronize the various
replicas.

What should the SortNumber be for each of five users who are working
independently, each with 100 as the currently highest sortnumber? When
the databases are synchronized, will they all have different numbers?
How? Which of the five users goes first?
 
T

Thomas

That's a good point John
but it only me here on my system at home
and my laptop that I planned use in the field to print
proposals in the field as of now I come home and E-Mail them.
I was going to use the data base in the field today and that's
when I noticed that the proposal that was printing was all out of order.
I only use the SortNumber for printing the proposals
so the data is printed the same as it looks in the form
for some reason when I would print the record the Detail
of the record would group and sort the lines by the
serviceID number not the order that I would place it.
So I added the autonumber to the table.
The Database is all base on the NorthWind Traders sample
it prints off of the projectID/OrderID just like the sample database

Thanks in advance

Thomas
 
J

John Vinson

I only use the SortNumber for printing the proposals

In that case I'd suggest just adding a date/time field with a default
value of Now(), and sorting by it. You'll get the records in
chronological order of entry.
 
T

Thomas

Great idea so easy
Thank You so much

Thomas


John Vinson said:
In that case I'd suggest just adding a date/time field with a default
value of Now(), and sorting by it. You'll get the records in
chronological order of entry.
 

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