Is there any way to determine the value type of an openargs value being passed, and then assign the value to the appropriate field depending on its value?
Example:
The onOpen even of my customer details from is now set to assign the openargs value (if any) to the Account Number field. What I want it to do is, if the openargs value is “numeric” (a 4 or 5 digit number only) then assign its value to account number field, but if it is a “text” value (customer name lets say) then assign its value to the Customer name field.
If that is even possible, I would need to go one step further and somehow distinguish the difference between a customer name value (text only) and the value of an address (mixed numbers and text) to pass the value to the correct field.
Was thinking something along the line of: (pretty sure these functions doesn't exist)
if openargs.datatype = "text only" then
me.customer_name = openargs
ElseIf openarge.datatype = "numeric value only" then
me.account_number = openargs
Elseif openargs.datatype = “numeric and text Value" then
me.Address = openargs
End If
Anyone have correct syntax for this or any other suggestions?
Example:
The onOpen even of my customer details from is now set to assign the openargs value (if any) to the Account Number field. What I want it to do is, if the openargs value is “numeric” (a 4 or 5 digit number only) then assign its value to account number field, but if it is a “text” value (customer name lets say) then assign its value to the Customer name field.
If that is even possible, I would need to go one step further and somehow distinguish the difference between a customer name value (text only) and the value of an address (mixed numbers and text) to pass the value to the correct field.
Was thinking something along the line of: (pretty sure these functions doesn't exist)
if openargs.datatype = "text only" then
me.customer_name = openargs
ElseIf openarge.datatype = "numeric value only" then
me.account_number = openargs
Elseif openargs.datatype = “numeric and text Value" then
me.Address = openargs
End If
Anyone have correct syntax for this or any other suggestions?