adding number with string
im adding an applicant number like this APP-0001 what will i do to automaically add like that
VB Code:
With tbInquiry
If .RecordCount = 0 Then
txtAppID = "00000001"
Else
.MoveLast
txtAppID = .Fields(0) + 1
' txtAppInfo(0).SetFocus
End If
End With
End Sub
Re: adding number with string
eh a little more info are you using a listbox ?
Re: adding number with string
Re: adding number with string
what is the database value that you are having...if it is "00000001" then try this
VB Code:
With tbInquiry
If .RecordCount = 0 Then
txtAppID.Text = "00000001"
Else
.MoveLast
txtAppID.Text = "APP-" & Format(Val(.Fields(0) & "") + 1,"0000")
End If
End With