Results 1 to 4 of 4
  1. #1
    Join Date
    Sep 2003
    Posts
    69

    Unanswered: AUtocount but with mix numbers (letter +number)

    Is there any posibility to set a field as autocount but with a mix number. Letter + number : e.g. A1, A2, A3, A4,A5,A6........

    Or should i do this afterwards with a query => newID: "A"+ID
    But the problem is ID is a long integer and A is a string he won't combine them both.

  2. #2
    Join Date
    Nov 2003
    Posts
    1,487
    You will need to seperate the Alpha character from the numerical characters:

    Dim Num As Long
    Num = CLng(Mid$(myDataString, 2, Len(myDataString)))

    You can use statements like this:

    CLng(Mid$(myDataString, 2, Len(myDataString)))

    within your query,


  3. #3
    Join Date
    Sep 2003
    Posts
    69
    I am not sure thils will do what i want. What i need i add an prefix to a number , so add a alpha character to a number.

    in a query should that be something like:

    Number | Newnumber: "A"+[Number] |
    ___________________________________
    [TABLE] | |
    ___________________________________


    I also tried Newnumber: CLng(Mid$("A", 2, Len("A"))) in the query but it's two times MyDataString, it doesn"t mention anywhere the original number so i guess it can't work.
    You should tell the program => convert number to string and put an "A" in front of it and keep that value in Newnumber.
    It shouldn't be that difficult but wxhat is the correct syntax ?

  4. #4
    Join Date
    Sep 2003
    Posts
    69
    I foundt it !

    I've put in the query :

    newnumber: "A"+CStr([number])

    and it works!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •