Как мне кодировать инкремент, за которым следует какое-то имя
Например, ID-это 12234every, связанная с введенной информацией , когда я нажимаю кнопку complete , msg bx появляется как "do you continue with same id" , если пользователь нажимает кнопку "да"опять же ID должен быть виден затем -Е1,Е2,Е3.,,, и т. д., пока пользователь введите "нет".
Пожалуйста, помогите мне в этом, как кодировать логику. Ниже приведен мой код
Me.txtUniqueID.Enabled = False Then MsgBox("Audit already performed for the Unique ID!!!", vbInformation, "Duplicate entry!!!") Exit Sub End If Try If Me.txtUniqueID.Text = "" Then MsgBox("Please provide Unique id to proceed!", vbInformation, "Value required") ElseIf Me.DteTransDate.Text = "" Then MsgBox("Please select Transancation Date to proceed!", vbInformation, "Value required") ElseIf Me.cmbSupervisor.Text = "" Or Me.cmbSupervisor.Text = "-Select-" Then MsgBox("Please select Supervisor name to proceed!", vbInformation, "Value required") ElseIf Me.cmbProcessor.Text = "" Or Me.cmbProcessor.Text = "-Select-" Then MsgBox("Please select processor name to proceed!", vbInformation, "Value required") ElseIf Me.txtSupEmpID.Text = "" Or Me.txtSite.Text = "" Or Me.txtProcMsID.Text = "" Or Me.txtProcEmpID.Text = "" Then MsgBox("Incorrect Processor Name!, Please select Processor name properly", vbInformation, "Value required") ElseIf Me.radioProcessedYes.Checked = False And Me.radioProcessedNo.Checked = False Then MsgBox("Please select whether claim processed correctly or not!", vbInformation, "Value required") ElseIf Me.cmbAuditType.Text = "" Or Me.cmbAuditType.Text = "-Select-" Then MsgBox("Please select Audit type/Tool name!", vbInformation, "Value required") ElseIf Me.radioOrgYes.Checked = False And Me.radioOrgNo.Checked = False Then MsgBox("Please select Org received date!", vbInformation, "Value required") ElseIf Me.radioUrgencyYes.Checked = False And Me.radioUrgencyNo.Checked = False Then MsgBox("Please select Urgency!", vbInformation, "Value required") ElseIf Me.radioBenefitYes.Checked = False And Me.radioBenefitNo.Checked = False Then MsgBox("Please select Benefit!", vbInformation, "Value required") ElseIf Me.radioWOLYes.Checked = False And Me.radioWOLNo.Checked = False Then MsgBox("Please select Returned AOR/WOL!", vbInformation, "Value required") ElseIf Me.radioTypeYes.Checked = False And Me.radioTypeNo.Checked = False Then MsgBox("Please select Case type!", vbInformation, "Value required") ElseIf Me.radioSubtypeYes.Checked = False And Me.radioSubtypeNo.Checked = False Then MsgBox("Please select Case Subtype!", vbInformation, "Value required") ElseIf Me.radioProviderYes.Checked = False And Me.radioProviderNo.Checked = False Then MsgBox("Please select Provider status!", vbInformation, "Value required") ElseIf Me.radioEmpGroupYes.Checked = False And Me.radioEmpGroupNo.Checked = False Then MsgBox("Please select special employer group!", vbInformation, "Value required") ElseIf Me.radioProcessedNo.Checked = True And Me.txtErrorCodes.Text = "" Then MsgBox("Please provide error codes!", vbInformation, "Value required") ElseIf Me.cmbLevel.Text = "" Then MsgBox("Please select level of Audit PreProcess/Intake/Setup!", vbInformation, "Value required") ElseIf Me.cmbAuditType.Text = "Agile" And (Me.cmbLevel.Text = "" Or Me.cmbLevel.Text = "-Select-") Then MsgBox("Please select level of Audit PreProcess/Intake/Setup!", vbInformation, "Value required") Else 'Insert Records Dim ConStr As String = "" Dim Yr As String = "" Dim FileName As String = "" Dim CFA = False, Defect = False, Org = False, Urgency = False, Benefit = False, Wol = False, CaseType = False, Subtype = False, Provider = False, EmpGroup As String = False Dim TransID As String = "" '*********************** 'Unique ID If Me.cmbAuditType.Text = "Agile" Then If Me.cmbLevel.Text = "PreProcess" Then TransID = Trim(Me.txtUniqueID.Text) & "-" & Me.txtSuffix.Text & "-P" ElseIf Me.cmbLevel.Text = "Intake" Then TransID = Trim(Me.txtUniqueID.Text) & "-" & Me.txtSuffix.Text & "-I" ElseIf Me.cmbLevel.Text = "1 Case Setup" Then TransID = Trim(Me.txtUniqueID.Text) & "-" & Me.txtSuffix.Text & "-C1" ElseIf Me.cmbLevel.Text = "2 Case Setup" Then TransID = Trim(Me.txtUniqueID.Text) & "-" & Me.txtSuffix.Text & "-C2" ElseIf Me.cmbLevel.Text = "Reviewer" Then TransID = Trim(Me.txtUniqueID.Text) & "-" & Me.txtSuffix.Text & "-R" Else MsgBox("Please select audit level Preprocess/Intake/Setup!!!", vbInformation, "Audit type is missing!!!") Exit Sub 'TransID = Trim(Me.txtUniqueID.Text) & "-" & Me.txtSuffix.Text End If ElseIf Me.cmbAuditType.Text = "Existing" Then If Me.cmbLevel.Text = "Intake" Then TransID = Trim(Me.txtUniqueID.Text) & "-" & Me.txtSuffix.Text & "-P" ElseIf Me.cmbLevel.Text = "1 Case Setup" Then TransID = Trim(Me.txtUniqueID.Text) & "-" & Me.txtSuffix.Text & "-C1" ElseIf Me.cmbLevel.Text = "2 Case Setup" Then TransID = Trim(Me.txtUniqueID.Text) & "-" & Me.txtSuffix.Text & "-C2" ElseIf Me.cmbLevel.Text = "Reviewer" Then TransID = Trim(Me.txtUniqueID.Text) & "-" & Me.txtSuffix.Text & "-R" Else MsgBox("Please select audit level Preprocess/Intake/Setup!!!", vbInformation, "Audit type is missing!!!") Exit Sub 'TransID = Trim(Me.txtUniqueID.Text) & "-" & Me.txtSuffix.Text End If ElseIf Me.cmbAuditType.Text = "Compliance" Then TransID = Trim(Me.txtUniqueID.Text) & "-" & Me.txtSuffix.Text & "-C" ElseIf Me.cmbAuditType.Text = "Intake" Then TransID = Trim(Me.txtUniqueID.Text) & "-" & Me.txtSuffix.Text & "-I" ElseIf Me.cmbAuditType.Text = "Stars" Then TransID = Trim(Me.txtUniqueID.Text) & "-" & Me.txtSuffix.Text Else MsgBox("Please select level of Audit PreProcess/Intake/Setup!", vbInformation, "Value required") Exit Sub End If
Что я уже пробовал:
Я новичок в кодировании, поэтому не знаю, как это сделать , какой из них будет объявлен и как сформировать оператор в цикле for, так что помогите мне
CHill60
Я только что заметил, что это уже второй раз, когда вы публикуете этот вопрос. Мацей уже рассказывал вам о циклах While. Не задавайте больше вопросов по этому поводу - Если вы не понимаете, что мы имеем в виду, то ответьте одному или обоим из нас, и мы постараемся помочь вам в дальнейшем