Results 1 to 12 of 12
  1. #1
    Starter-4-10 is offline Novice
    Windows 10 Access 2003
    Join Date
    Dec 2016
    Posts
    27

    Put TxtBox1 over TxtBox2, select which visible with Control Button(s) and Properties? Possible?


    Using one Form, is it possible to save on-screen space by using two identically-sized, scrolling, Memo text boxes, positioned exactly on top of each other, and choose (by Control button, I assume), which is visible at any moment?

    Each must be editable while visible. Ideally, while that Record is open, each should save its scroll-position if the other is made visible, both boxes reverting to the default scroll-at-top position on closing the Record.

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,550
    Yes,the button click would show 1 or the other memo.
    set 1 property, box visible, the other not visible,then....
    Code:
    Sub btnShow_click()
    TxtMemo1.visible = not txtMemo1.visible
    TxtMemo2.visible = not txtMemo2.visible
    end sub

  3. #3
    aytee111 is offline Competent At Times
    Windows 10 Access 2013 64bit
    Join Date
    Nov 2011
    Location
    Nomad
    Posts
    3,936
    I recently battled with this issue of the cursor always jumping to the top whenever the text box lost focus - I was trying to compare two memo fields side by side. I ended up by making them subforms which looked like text boxes, then the cursor did not reposition itself but stayed in the same place.

  4. #4
    Starter-4-10 is offline Novice
    Windows 10 Access 2003
    Join Date
    Dec 2016
    Posts
    27
    Looks good! Thank you both. aytee111's subforms probably beyond me. Will post again if problem solved.

  5. #5
    aytee111 is offline Competent At Times
    Windows 10 Access 2013 64bit
    Join Date
    Nov 2011
    Location
    Nomad
    Posts
    3,936
    Subforms are not complicated and once you see how helpful they can be you won't look back!

    Create a new form with one textbox for your memo field. Set these properties to No - record selectors, navigation - remove header/footer and set scroll bars to vertical only. Close and save. In design view of your main form, click on Design and in the controls to add select subform/subreport. The wizard will ask you for the name of your subform and then you place it and size it the way you want. That is all there is to it!

  6. #6
    Starter-4-10 is offline Novice
    Windows 10 Access 2003
    Join Date
    Dec 2016
    Posts
    27
    ... delayed 90 mins because Access decided it couldn't use .jpgs. Mic Off Save My Settings Wizard (in effect, a 'restore previous settings') couldn't find the .OPS file containing previous. Normal System Restore took 15 mins, but .jpgs are back ...

    Thanks, Aytee111. Actually, I'm working on an existing database, and trying to get rid of a ?subform called Page 2, which has 2 textboxes. Control buttons make the view change from main form to subform, so you can't see both at once - a nuisance. Or is this novice misunderstanding your suggestion?

  7. #7
    aytee111 is offline Competent At Times
    Windows 10 Access 2013 64bit
    Join Date
    Nov 2011
    Location
    Nomad
    Posts
    3,936
    That sounds a bit weird, going from main form to subform and back, that is not how they are designed to work. No wonder it is giving you issues!

  8. #8
    Starter-4-10 is offline Novice
    Windows 10 Access 2003
    Join Date
    Dec 2016
    Posts
    27
    Problem using Ranman256's suggestion. Maybe VBA 'grammar'. (Please remember I'm a novice.) Created a Command Button (not wizard). In its Properties, click-event-code, pasted his vba and changed his sample names, giving:

    Private Sub Command177_Click()
    Sub btnShow_click()
    txtDefinition.Visible = Not txtNotes.Visible
    txtNotes.Visible = Not txtDefinition.Visible
    End Sub
    End Sub

    Two End Subs seemed odd. Tested. Compile error: Expected End Sub. Help says use End Sub, not End Function or End Property. Various attempts to edit, same problem. Any advice, please?

  9. #9
    aytee111 is offline Competent At Times
    Windows 10 Access 2013 64bit
    Join Date
    Nov 2011
    Location
    Nomad
    Posts
    3,936
    Remove line "Sub btnShow_click()"
    Remove second End Sub

  10. #10
    Starter-4-10 is offline Novice
    Windows 10 Access 2003
    Join Date
    Dec 2016
    Posts
    27
    Thanks, aytee111. That made (on click) one txtbox invisible; but more clicks didn't bring make it visible again, so it was more like a Delete. Experimented, made this, which toggles nicely (but):

    Private Sub Command177_Click()


    If Me!txtReferencesThisItem.Visible = "True" Then
    Me!txtReferencesThisItem.Visible = "False"
    Else: Me!txtReferencesThisItem.Visible = True
    End If
    End Sub

    But #1. The wrong (less important) txtbox is on top - and I can't find info on how Access decides "layer order". But #2. On changing to another Record, ideally, the toggle should be reset to "both txts = visible". More threads?

    Thank you both. imo, this question is solved, and I understand that you guys can so mark it.

  11. #11
    aytee111 is offline Competent At Times
    Windows 10 Access 2013 64bit
    Join Date
    Nov 2011
    Location
    Nomad
    Posts
    3,936
    #1, Layer order: Arrange, send to back. On 2003 there is something similar (can't remember exactly!)

    #2, find the event that occurs, not sure how user is going to next record.

    (#3, mark it solved yourself)

  12. #12
    Starter-4-10 is offline Novice
    Windows 10 Access 2003
    Join Date
    Dec 2016
    Posts
    27
    #1: Design/select field/Format/Bring to front. Thanks.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Visible Properties For All Users After Update
    By Flickster in forum Forms
    Replies: 1
    Last Post: 10-18-2015, 09:58 AM
  2. Replies: 16
    Last Post: 03-26-2015, 08:35 PM
  3. Replies: 1
    Last Post: 02-27-2015, 10:01 AM
  4. Replies: 3
    Last Post: 03-29-2012, 12:40 PM
  5. Replies: 5
    Last Post: 01-29-2010, 11:09 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums