Vertical scroll bars in a text box. (1 Viewer)

isladogs

MVP / VIP
Local time
Today, 09:31
Joined
Jan 14, 2017
Messages
18,186
Very odd. That part worked fine in the version I tested yesterday ...BUT NOT in your latest upload.

I would upload my copy but there are several other issues e.g.
1. on first load all details items show the same data & the red text shows for each
2. clicking the details box shows the correct text for each BUT hides the red text for each no matter how long/short it is
3. there is an extra 'phantom' details entry at the bottom of each member subform
4. Private checkbox is locked
.... and probably more!

NOTE: Points 1 & 2 are unavoidable in a continuous form as each item is the same control repeated for each record.
So changes to one record affect all records. If that's a deal breaker, then you need to scrap this idea

Points 3 & 4 are separate issues not related to this code AFAIK

Sorry to say that its a bit of a mess. The Recordset part in Form_Current conflicts with other code elsewhere on your form

Rather than tinker at fixing issues one at a time, it needs the whole form reviewing to try & make sense of what's going on.
I'm busy all day today but will try and look at it in the near future.
Hopefully someone else can look at this first.

It look like the Form_Current event needs rewriting completely

For now I suggest you disable the Form Current event and continue without using this effect. Then at least the rest of the form is usable for now
 
Last edited:

tif

Registered User.
Local time
Today, 03:31
Joined
Mar 1, 2017
Messages
13
Hi Ridders,


Thanks for your reply. If I understand correctly, you are saying that on load having all lines read with the details from the first record and only changing when you change focus would be the best case in a continuous form. If that is the case, then this solution actually doesn't work for continuous forms. I want the "at a glance" functionality but if the information is incorrect and only adjusts on focus, then I might as well have a zoom box. I think incorrect information is probably worse than having to click on the box to see ALL information.


Thanks for your help anyway. I guess the answer is this solution does NOT work with continuous forms afterall.


I appreciate your help but there is no point continuing down this path so please don't waste your time.



If anyone has a solution to being able to see "at a glance" if there is additional information in a long text box on a continuous form without requiring focus, I would love to hear it.



Thanks for your help.
 

isladogs

MVP / VIP
Local time
Today, 09:31
Joined
Jan 14, 2017
Messages
18,186
Hi tif

It certainly doesn't work in the way you were hoping though there are coding issues that are irrelevant of this particular issue e.g. locked checkbox

I didn't quite say what you've written but it makes little odds if its no use for you.
You could certainly use a zoombox but personally I don't think that's necessary in your case.

Instead I suggest you use one of the following:
a) slightly increase the height of the Details textbox and increase the height of the form & subform to fill the screen height.
b) a single form where the 'Click for More' code may work fine for you though you may still need to do some code changes

I've done solution a) in the attached version - have a look & see what you think.

Anyway, sorry for raising your hopes - it was a long time ago that I posted this!
 

Attachments

  • Member Log v2.zip
    107.8 KB · Views: 104

MajP

You've got your good things, and you've got mine.
Local time
Today, 05:31
Joined
May 21, 2018
Messages
8,463
This works for me
if you build a function
Code:
Public Function CropDetails(EntryNo As Long) As String
  CropDetails = DLookup("Details", "MemberDetails", "entryNo = " & EntryNo)
  If Len(CropDetails) > 120 Then
    CropDetails = Left(CropDetails, 120) & "  <font color=red>... (Double click for More)</font>"
  End If
End Function
You will get this in a continous form

Code:
Had eyelid surgery today.  Doesn't need food or anything now.  She's gluten intolerant.  Let her know we care and are th  [COLOR="red"]... (Double click for More)[/COLOR]

Had cataracts eye surgery in one eye on Tuesday 6/12/18.  Checked with her on Wednesday the 13th.  All went well.  Sched [COLOR="Red"] ... (Double click for More)[/COLOR]

Other code needed
Code:
Private Sub Form_Open(Cancel As Integer)
   Me.Details.ScrollBars = 2
   Me.AllowEdits = False
   Me.AllowDeletions = False
   Me.Details.ControlSource = "=cropDetails([entryno])"
End Sub

Private Sub Details_DblClick(Cancel As Integer)
  'I would probably have a pop up form with just the entry, instead of changing the control source
  Me.Details.ControlSource = "Details"
End Sub

Private Sub Details_Exit(Cancel As Integer)
 'changes the control source back
 Me.Details.ControlSource = "=cropDetails([EntryNo])"
End Sub
 

isladogs

MVP / VIP
Local time
Today, 09:31
Joined
Jan 14, 2017
Messages
18,186
Hi MaqjP

That's certainly closer than the previous attempt.

However I don't think there's any way around the fact that double clicking details shows the full text for all records.
Clicking on another record of course swops it back

So the question is whether the OP is happy with this solution :)
 

MajP

You've got your good things, and you've got mine.
Local time
Today, 05:31
Joined
May 21, 2018
Messages
8,463
However I don't think there's any way around the fact that double clicking details shows the full text for all records.

My thought is if you wanted to see the whole thing you really would have a pop up "zoom" when you double click instead of showing the whole text. It seems silly to go through that effort only to have to scroll through a little box. I would roll my own pop up instead of the zoom control.
 

isladogs

MVP / VIP
Local time
Today, 09:31
Joined
Jan 14, 2017
Messages
18,186
Agreed - that's my approach as well.
The 'solution' which was offered early on in this thread was originally for single forms where it works well.
Its a kludge forcing it to partly work in a continuous form
 

tif

Registered User.
Local time
Today, 03:31
Joined
Mar 1, 2017
Messages
13
Thanks Ridders and MaJP. I appreciate all of your help and efforts.


It isn't that clicking on the specific box to see additional details is an issue. It is knowing which boxes require clicking on to see additional details without having to click in the box on every line. Unfortunately, I think returning the first record to all lines would be worse than having to click through the boxes.


It was a good effort but it seems that what I was hoping for is not possible at least in a continuous form. Again, thank you for all of your assistance.
 

MajP

You've got your good things, and you've got mine.
Local time
Today, 05:31
Joined
May 21, 2018
Messages
8,463
Take a look at this demo. I think it is pretty close. I gave you two versions. Click the radio button to see each. One is swithching the control source the other is pop up.
 

Attachments

  • Member Log v5.accdb
    768 KB · Views: 127

MajP

You've got your good things, and you've got mine.
Local time
Today, 05:31
Joined
May 21, 2018
Messages
8,463
So it would look like this



I prefer double click to the pop up, but the other version makes the details show full text on double click
 

Attachments

  • CropSelection.jpg
    CropSelection.jpg
    98.9 KB · Views: 390
  • MemmberDetailsPopUp.jpg
    MemmberDetailsPopUp.jpg
    67.6 KB · Views: 401

tif

Registered User.
Local time
Today, 03:31
Joined
Mar 1, 2017
Messages
13
Thanks MajP. That works in my continuous form! :D



I embedded your code into my set form (rather than popup form) and it works great!



The only thing that may be difficult with my user is that with this change when they click the edit button and then enter the details textbox which is longer and displaying the message "Double click for details", they have to double click on "Double click for details" to get the full notes and turn off the double click message before it will let them start typing/editing the notes in the field.



I think I can educate my user to live with that if necessary. Before I do, would it be possible to add an on Enter code that determines that the previous key was the Edit button and turns off the message and puts the textbox into edit mode without messing up what you have already done?
 

MajP

You've got your good things, and you've got mine.
Local time
Today, 05:31
Joined
May 21, 2018
Messages
8,463
If they plan to edit, then in the edit button you would also add the code to change the controlsource instead of forcing them to double click again.

Me.Details.ControlSource = "Details"

But understand when hit any of those edit buttons you can edit any record you desire, not just the record you selected. That is why the pop up may give you more control
 

tif

Registered User.
Local time
Today, 03:31
Joined
Mar 1, 2017
Messages
13
Hi MajP,


Sorry for the delay. This is perfect. Thank you!
 

Users who are viewing this thread

Top Bottom