R
Rob M.
Hi I'm new at VB. I want to write code with a Select case Statement that
would validate data to be entered on a field lngAccountNum that would have
an account number range i.e 1000 to 1999 if The txtAccountType field =
"Asset", "Liability" would be "2000 to 2999, "Equity" "3000 to 3999" and so
on.
I don't know how to build an event . Is it a function, I believe so?
Private Function AcctNum Before Update (Cancel As Integer)
Account is an integer in my Data type field. I'm not sure if it will work.
I have an idea about the code.
The first part I'm not sure about Function or sub or before update?
Dim txtAcctType As String
Dim lngAccountNum As Long
ErrorHandler here
Select Case "Asset"
lngAccount=Between 999 and 2000
Select case "Liability"
lngAccountNum=Between 1999 and 3000
etc
Case Else
End select
End Function?
Thanks for your help, if you understand me, sorry.
would validate data to be entered on a field lngAccountNum that would have
an account number range i.e 1000 to 1999 if The txtAccountType field =
"Asset", "Liability" would be "2000 to 2999, "Equity" "3000 to 3999" and so
on.
I don't know how to build an event . Is it a function, I believe so?
Private Function AcctNum Before Update (Cancel As Integer)
Account is an integer in my Data type field. I'm not sure if it will work.
I have an idea about the code.
The first part I'm not sure about Function or sub or before update?
Dim txtAcctType As String
Dim lngAccountNum As Long
ErrorHandler here
Select Case "Asset"
lngAccount=Between 999 and 2000
Select case "Liability"
lngAccountNum=Between 1999 and 3000
etc
Case Else
End select
End Function?
Thanks for your help, if you understand me, sorry.