bguidry
01-02-2013, 03:32 PM
I am trying to set a field, within a temporary table on a subform, equal to certain string characters from a textbox on a mainform. We enter values in the textbox like "ABC-ABCD-1". The VBA code copies this to the temporary table field and adds incremental integers to the end of the string, such as:
rstLoadTable!Field = textbox & Format(Str(intCount))but now need to have it exclude the integer after the second "-" character (or possibly simply the last character in the string; but not by count of the leftmost characters, as this may change). Can someone help me figure out how to exclude the tailing characters that follow the second "-" from the textbox string when setting the rstLoadTable!Field equal to it?
rstLoadTable!Field = textbox & Format(Str(intCount))but now need to have it exclude the integer after the second "-" character (or possibly simply the last character in the string; but not by count of the leftmost characters, as this may change). Can someone help me figure out how to exclude the tailing characters that follow the second "-" from the textbox string when setting the rstLoadTable!Field equal to it?