I'm trying to remove underlines that might exist in a table field (type MEMO, set to RTF, so the user's formatting is preserved). My plan of attack is to use an update query (pointed at the table) whose "update to" calls a VBA function, passing the name of memo field as "InputMemo". Where I hit a dead end is how to implement the UNDERLINE property (i.e., someobject.underline = FALSE). Here's the code that doesn't compile:
Public Function funRemoveUnderlines(InputMemo As Variant) As Variant
Dim FixedMemo As Variant
FixedMemo = InputMemo
FixedMemo.Underline = False
funRemoveUnderlines = FixedMemo
End Function
FixedMemo, which is intended to be a container with the "fixed" (no underlines) version of the InputMemo field, is a variable, not an object, which is why FixedMemo.Underline is an invalid statement (this is my interpretation, anyway).
Any fixes or suggestions for an alternative approach? The fact that I need to modify a table field, rather than a form or report control, makes things more complicated, I think.
Thanks.
Public Function funRemoveUnderlines(InputMemo As Variant) As Variant
Dim FixedMemo As Variant
FixedMemo = InputMemo


funRemoveUnderlines = FixedMemo
End Function
FixedMemo, which is intended to be a container with the "fixed" (no underlines) version of the InputMemo field, is a variable, not an object, which is why FixedMemo.Underline is an invalid statement (this is my interpretation, anyway).
Any fixes or suggestions for an alternative approach? The fact that I need to modify a table field, rather than a form or report control, makes things more complicated, I think.
Thanks.