charly.csh
New member
- Local time
- Today, 02:58
- Joined
- May 7, 2020
- Messages
- 9
Hi everyone
I hope somebody could help me with this...
I'm writing into a textbox with my code a "List of people" depending on some Checkboxes. (The name of the textbox is TeamWorktxt) and the checkboxes are WT_Quality, WT_Production, WT_Warehouse, WT_Process.
If I l click on one it adds the name of the guy responsible of the "area" and after this addition I am also using the VbCrLf to "create" an "Enter" effect... it gives the appearance into the big textbox like a "list"
The issue is when unclick on this check box an use the property REPLACE and CHR(10) or CHR(13) it deletes all the "blank" spaces and the list lose its structure. What I want is just to clean the line created or "undo" my "Enter"
I do not know if there is just a property to eliminate just a "line" and not all the blank spaces
I highly appreciate your support
My code
Please Use Code Tags:----
'Enclosed is the example... I hope somebody could help
I hope somebody could help me with this...
I'm writing into a textbox with my code a "List of people" depending on some Checkboxes. (The name of the textbox is TeamWorktxt) and the checkboxes are WT_Quality, WT_Production, WT_Warehouse, WT_Process.
If I l click on one it adds the name of the guy responsible of the "area" and after this addition I am also using the VbCrLf to "create" an "Enter" effect... it gives the appearance into the big textbox like a "list"
The issue is when unclick on this check box an use the property REPLACE and CHR(10) or CHR(13) it deletes all the "blank" spaces and the list lose its structure. What I want is just to clean the line created or "undo" my "Enter"
I do not know if there is just a property to eliminate just a "line" and not all the blank spaces
I highly appreciate your support
My code
Please Use Code Tags:----
Code:
'****************************************
Private Sub WT_Quality_Click()
If Me.WT_Quality = -1 And Len(Me.TeamWorktxt & vbNullString) = 0 Then
Me.TeamWorktxt = DLookup("[Name]", "[TeamWork]", "[Department]= 'Quality'")
ElseIf Me.WT_Quality = -1 And Me.TeamWorktxt <> "" Then
Me.TeamWorktxt = Me.TeamWorktxt & vbCrLf & DLookup("[Name]", "[TeamWork]", "[Department]= 'Quality'")
End If
If Me.WT_Quality = 0 Then
Dim Quality As String
Quality = DLookup("[Name]", "[TeamWork]", "[Department]= 'Quality'")
'Here is my issue, I am sure if this is the best way to do this...
Me.TeamWorktxt = Replace(Me.TeamWorktxt, Quality, "")
Me.TeamWorktxt = Replace(Me.TeamWorktxt, Chr(10), "") 'Chr(10)
Me.TeamWorktxt = Replace(Me.TeamWorktxt, Chr(13), "") 'Chr(13)
End If
End Sub
'Enclosed is the example... I hope somebody could help
Attachments
Last edited by a moderator: