I'd like to take the First 8 characters of the data a user inputs into a form and populate another hidden field with it for saving to the table. I know how to hide the field but not how to get the substring from user input...any suggestions?
Substring from Form Data
Collapse
X
-
Tags: None
-
[CODE=vb]Originally posted by ReubenPattersonI'd like to take the First 8 characters of the data a user inputs into a form and populate another hidden field with it for saving to the table. I know how to hide the field but not how to get the substring from user input...any suggestions?
Private Sub Text4_AfterUpda te()
Me.Text4 = Left(Me.Text4, 8)
End Sub
[/CODE]
Additional hidden field not needed.
Good luck. -
Thanks, but I'm looking to store both the submitted data and substring in a different field. Apologies if I wasn't very precise in the original post.
Originally posted by FishVal[CODE=vb]
Private Sub Text4_AfterUpda te()
Me.Text4 = Left(Me.Text4, 8)
End Sub
[/CODE]
Additional hidden field not needed.
Good luck.Comment
-
[CODE=vb]Originally posted by ReubenPattersonThanks, but I'm looking to store both the submitted data and substring in a different field. Apologies if I wasn't very precise in the original post.
Private Sub Text4_AfterUpda te()
Me.Text5 = Left(Me.Text4, 8)
End Sub
[/CODE]
But it is not needed and moreover not reccomended to store derived data as you can easily retrieve it from the table with query.
SELECT Left(txtInput,8 ) AS txtLeft8Letters FROM tblTable;Comment
Comment