Savings and timeDeposit Account number must follow this String pattern: nnnnxS
where:
nnnn = customer id
x = account size
S = Savings account type
example:
• 10011S = 1st account of customer 1001, type is Savings
• 10012S = 2nd account of customer 1001, type is Savings
• 10013T = 3RD account of customer 1001, type is TimeDeposit
• 10099S = 9th account of customer 1009, type is Savings
• 101015S = 15th account of customer 1010, type is Savings
so account size will count as long as the customerId is creating new account.. my problem is how will i loop the accountsize specifically for the given CustomerId and throw it in my table "TblAccount" the method of looping is still not there cause i dont know where to start.. i hope you can help me..
tnx! =)
this is my codes:
Expand|Select|Wrap|Line Numbers
- Option Compare Database
- Private Sub btnAccountSave_Click()
- Dim strQuery As String
- If cmbAccountType.Value = "Savings Account" Then
- txtAccountNumber.Value = _
- (txtAccountCustomerId.Value & " " & "S")
- ElseIf cmbAccountType.Value = _
- "TimeDeposit Account" Then
- txtAccountNumber.Value = _
- (txtAccountCustomerId.Value & " " & "T")
- End If
- End Sub
- '><
- Private Sub txtAccountCustomerId_AfterUpdate()
- Dim strQuery As String
- If IsNull(DLookup("CustomerId", "TblCustomer", "CustomerID = " & [txtAccountCustomerId] & " ")) Then
- MsgBox "Customer Id doesn't exist!"
- txtAccountNumber.Enabled = False
- txtInitialDeposit.Enabled = False
- txtMaintainingBalance.Enabled = False
- Else
- cmbAccountType.Enabled = True
- txtAccountNumber.Enabled = False
- txtInitialDeposit.Enabled = False
- txtMaintainingBalance.Enabled = False
- End If
- End Sub