Results 1 to 2 of 2

Thread: adding an applicantID with string at first

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Nov 2006
    Posts
    84

    Question adding an applicantID with string at first

    how can i add applicant id with a string like this one APP-0001 im using a database and when i click the button add it will generate a new applicant id. heres m code

    VB Code:
    1. With tbInquiry
    2.     If .RecordCount = 0 Then
    3.         txtAppID = "00000001"
    4.     Else
    5.         .MoveLast
    6.         txtAppID = .Fields(0) + 1
    7. '        txtAppInfo(0).SetFocus
    8.     End If
    9. End With

  2. #2
    Learning .Net danasegarane's Avatar
    Join Date
    Aug 2004
    Location
    VBForums
    Posts
    5,853

    Re: adding an applicantID with string at first

    VB Code:
    1. txtAppID = rs.fields(0)
    2. tmp = left(tmp,3) & (Format(Cint(right(tmp,4))+1,"00#")
    Please mark you thread resolved using the Thread Tools as shown

Posting Permissions

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



Click Here to Expand Forum to Full Width