EdFred
knows enough, dangerous
- Local time
- Today, 06:49
- Joined
- Mar 2, 2007
- Messages
- 131
...I resize a field.
Access2007 (yep, still works, and not going to 365)
Win10x64
I have a SubForm (continuous) that I am logging conversations we have with customers: custID, convoDate, EmployeeID, Contact, Conversation. The conversation notes could get rather long, but I only want the default view to be a single line for readability (scrolling through history) purposes, but want the ability to see the whole conversation when a user enters that field, but I don't want them accidentally deleting conversations already entered so this is what I have:
Private Sub Conversation_Enter()
Me.Detail.Height = 2520
Me.Conversation.Height = 2520
Me.Conversation.SelStart = Nz(Len(Me.Conversation), 1)
End Sub
And resizes when exiting.
Private Sub Conversation_Exit(Cancel As Integer)
Me.Conversation.Height = 315
Me.Detail.Height = 315
End Sub
This works perfect, except for one glitch: When I am 3 to 4 records down (or far enough that records start to scroll off the top of the screen) the SelStart is overridden. The entire text is selected and any keystroke (other than TAB) will overwrite the selected text. I've narrowed it down to the resizing of the field as the issue. If I don't reset the size to normal view (315) then I don't get the full text selection. I've tried repainting, I've tried the order of which the resize and SelStart happens, I've tried SelLength. I've contacted other people.
This behavior exists when I open the subform on it's own. And it's definitely a screen size issue, because if I resize the main window in Access it happens as soon as any record is pushed off the top of the viewable area.
Anyone got any ideas?
Yeah, I know this is clunky, but I can't trust users to use Shift+F2 or to correctly edit/enter text from a pop over, or from an unbound textbox from the main form without doing something that causes the SaveRecord, DropChange CopytoClipboard dialogue that pops up.
Access2007 (yep, still works, and not going to 365)
Win10x64
I have a SubForm (continuous) that I am logging conversations we have with customers: custID, convoDate, EmployeeID, Contact, Conversation. The conversation notes could get rather long, but I only want the default view to be a single line for readability (scrolling through history) purposes, but want the ability to see the whole conversation when a user enters that field, but I don't want them accidentally deleting conversations already entered so this is what I have:
Private Sub Conversation_Enter()
Me.Detail.Height = 2520
Me.Conversation.Height = 2520
Me.Conversation.SelStart = Nz(Len(Me.Conversation), 1)
End Sub
And resizes when exiting.
Private Sub Conversation_Exit(Cancel As Integer)
Me.Conversation.Height = 315
Me.Detail.Height = 315
End Sub
This works perfect, except for one glitch: When I am 3 to 4 records down (or far enough that records start to scroll off the top of the screen) the SelStart is overridden. The entire text is selected and any keystroke (other than TAB) will overwrite the selected text. I've narrowed it down to the resizing of the field as the issue. If I don't reset the size to normal view (315) then I don't get the full text selection. I've tried repainting, I've tried the order of which the resize and SelStart happens, I've tried SelLength. I've contacted other people.
This behavior exists when I open the subform on it's own. And it's definitely a screen size issue, because if I resize the main window in Access it happens as soon as any record is pushed off the top of the viewable area.
Anyone got any ideas?
Yeah, I know this is clunky, but I can't trust users to use Shift+F2 or to correctly edit/enter text from a pop over, or from an unbound textbox from the main form without doing something that causes the SaveRecord, DropChange CopytoClipboard dialogue that pops up.