Afficher un message
Vieux 09/10/2007, 13h52   #3
Corey Forman
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: ASP Access and Creating an Incremental ID for a record

This might make more sense and simplify. I put this in a new post by mistake

I'm trying to set a variable to a call of ticket_ID from table tickets of the
most recent ID. Basically I want to call the most recent number in the column
ticket_ID and add 1000 to it to make a 4 digit #. What I've got is this:

user_details=split(request("ticket_userID") ,"/")
Q=request("ticket_id")
R = (1000 + Q)
ticketid=user_details(0) & cstr(R)
user_name=user_details(1)

This (plus more before) makes the 4 digit user ID combine with the 4 digit
number (which I need to be incremental, not random) to make an 8 digit
ticket number which makes the ticket origins easy to trace, and allows me to
keep track of the number of tickets created. Any ideas on how to make it
simple? The ticket_ID field is AutoNumbered right now so it's going up
incrementally, I just want to add 1000 to that and user that equation as R.
I'm stumped.


"pooradmin" wrote:

>
> Why not have the userid as it's own field, and use an autonumber for
> the ticketid field in another table?
>
>
> table1: (userinfo), userid, firstname, lastname, etc
> table2: (ticket info) userid, ticket_userid, ticket_staff, ticket.....
>
> you can join the two tables if need to return the results in a full
> query
>
> -J
> www.pooradmin.com
>
>
>

  Réponse avec citation
 
Page generated in 0,04892 seconds with 9 queries