Results 1 to 15 of 15
  1. #1
    nahum abramovich is offline Advanced Beginner
    Windows 7 64bit Access 2016
    Join Date
    Jun 2018
    Posts
    62

    floating notes in access form

    hi



    if possible...

    how can i create floating (i am not sure this is the correct word) notes inside box?

    for example i have 5 notes that i want to show on small box ... i want it to show the first note ...than after 5 sec the second one... and so on...and again from the beginning

    thanks

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,816
    Where would these 'notes' come from?
    Anything involving a timer is tricky. Form does have OnTimer event and TimerInterval property. I expect what you want would involve those.


    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    nahum abramovich is offline Advanced Beginner
    Windows 7 64bit Access 2016
    Join Date
    Jun 2018
    Posts
    62
    its not important for me where they come from (maybe a table if you have an idea ... I'd like to hear it..)
    I just want to have the ability to change them whenever I want and that they will be dynamically replaced by order ....

  4. #4
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,954
    I think you want a small popup form to appear and, as stated, cycle through each notes record in turn using a timer event with a timer interval =5000 (5 seconds).
    If you don't want users to be able to do anything else whilst the form is open, also make it modal.
    I use that idea in a few of my apps to display tips for new users.
    I would suggest that, if you create something like this, you allow users to close the popup form as it could get irritating to them.
    Colin, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I don't know, I keep quiet!
    If I don't know that I don't know, I don't know whether to answer

  5. #5
    nahum abramovich is offline Advanced Beginner
    Windows 7 64bit Access 2016
    Join Date
    Jun 2018
    Posts
    62
    Yess

    This is exactly what I need. Can you please explain to me how I do all this. Step by step. I will just mention that I am new to the access i and kindly ask you for a detailed explanation. Thank you so muchhhh

  6. #6
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,954
    Create a new form or open an existing form you want to use for this purpose.
    Change to design view and go to the Properties sheet. It should appear automatically but if not click the Properties Sheet button on the Design ribbon.
    Click the Other tab on the Properties sheet and change the Popup property to Yes. The form will then appear on top of any other open form.
    Optionally also change the Modal property to Yes. Doing that will prevent users clicking on any other form whilst the modal form is open.

    Now go to the Event tab and change the timer interval to 5000 (5 seconds) then add an Event procedure to the On Timer property
    The VBA editor will open to the Form_Timer event. Add code like this in the event procedure

    Code:
    Private Sub Form_Timer()
    DoCmd.GoToRecord,,acNext
    End Sub
    Save your form and return to Form view.

    Now the form will cycle through each record until the last BUT will then show error 2105 - can't go to the selected record (as there are no more records)
    To solve that, add error handling e.g. This will cause the code to loop back to the First record.

    Code:
    Private Sub Form_Timer()
    
    On Error GoTo Err_Handler
    
    DoCmd.GoToRecord , , acNext
    
    Exit_Handler:
      Exit Sub
    
    Err_Handler:
      If Err = 2105 Then DoCmd.GoToRecord , , acFirst 'return to first record
      GoTo Exit_Handler
    
    End Sub
    Colin, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I don't know, I keep quiet!
    If I don't know that I don't know, I don't know whether to answer

  7. #7
    nahum abramovich is offline Advanced Beginner
    Windows 7 64bit Access 2016
    Join Date
    Jun 2018
    Posts
    62
    First of all again thank you very much. Not obvious.
    2 questions:
    Where do I write / change the records (comments / tips) in a text box inside the form ? Which eventually comes from a table? Or ...?
    And a second question - Where do I place the second code?

  8. #8
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,954
    The data for your form needs to be stored in a table.
    As previously stated, place the code in the Form_Timer event
    Colin, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I don't know, I keep quiet!
    If I don't know that I don't know, I don't know whether to answer

  9. #9
    nahum abramovich is offline Advanced Beginner
    Windows 7 64bit Access 2016
    Join Date
    Jun 2018
    Posts
    62
    I did what you said and succeeded. I loved it and I have one more request.
    I have one main form and inside there are some buttons that lead to other forms,
    I want the tips / comments (the small form that i created) to appear only on the main form and every time you return to main form from the other forms.


    I will point out that in modal i put a Yes (because I want them to read and then close)


    Is it possible?

  10. #10
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,954
    Yes. Quite simple to do.
    When you open one of the other forms, you also need to close the main form.
    For example. add code like this to a button click event

    Code:
    Private Sub cmdOpenNewForm_Click
    
    DoCmd.OpenForm "YourNewFormName"
    DoCmd.Close acForm, Me.Name 'closes current form
    
    End Sub
    Then when you close your other form, re-open your main form with similar code on another button click event or the Form_Close event as you prefer.

    However, I think your users will soon get fed up with endlessly seeing these notes in turn every 5 seconds.
    Having a modal form certainly won't guarantee anyone actually reads the notes!

    Good luck!
    Colin, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I don't know, I keep quiet!
    If I don't know that I don't know, I don't know whether to answer

  11. #11
    nahum abramovich is offline Advanced Beginner
    Windows 7 64bit Access 2016
    Join Date
    Jun 2018
    Posts
    62
    Just in case I decide to change the concept.
    Is it possible to make this timer (which will switch between the records) not in a floating form, it will just be placed in the main form (in a fixed location - without the option of closing). Let's say.. just put something like box and the records will run there. Possible?

  12. #12
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,954
    Any form can have a timer event. It doesn't have to be a popup
    If you decide not to use a popup, the only way to have more than one form visible at once is to use overlapping windows display rather than the default tabbed documents
    Colin, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I don't know, I keep quiet!
    If I don't know that I don't know, I don't know whether to answer

  13. #13
    nahum abramovich is offline Advanced Beginner
    Windows 7 64bit Access 2016
    Join Date
    Jun 2018
    Posts
    62
    i created table name remarks and one field inside named remark

    1- i put a text box on the form (based on remark field).

    now ....on form / event tab:

    2- time interval i put :
    5000

    3- on timer (vba):

    Private Sub Form_Timer()

    On Error GoTo Err_Handler

    DoCmd.GoToRecord , , acNext

    Exit_Handler:
    Exit Sub

    Err_Handler:
    If Err = 2105 Then DoCmd.GoToRecord , , acFirst 'return to first record
    GoTo Exit_Handler

    End Sub

    and i get error
    the object "remarks" inset open....

    what am i doing wrong?

    i just want to have a fixed text box that inside are running several records

    can you guide me?

  14. #14
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows 10 Access 2016
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,530
    For the benefit of previous contributors and future readers the OP has started a new thread: https://www.accessforums.net/showthr...603#post458603
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

  15. #15
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,954
    Hi Peter
    You're welcome
    Colin, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I don't know, I keep quiet!
    If I don't know that I don't know, I don't know whether to answer

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

Similar Threads

  1. Floating Point Errors in my Report
    By f15e in forum Access
    Replies: 6
    Last Post: 01-20-2017, 12:02 PM
  2. Replies: 8
    Last Post: 12-31-2015, 03:58 PM
  3. Replies: 4
    Last Post: 04-24-2014, 01:54 PM
  4. Replies: 10
    Last Post: 04-24-2014, 01:43 PM
  5. Floating Text Box
    By glasgowlad1999 in forum Forms
    Replies: 1
    Last Post: 02-02-2011, 12:10 PM

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