Results 1 to 10 of 10
  1. #1
    PlamenGo is offline Novice
    Windows XP Access 2010 32bit
    Join Date
    Jun 2011
    Location
    Bulgaria
    Posts
    22

    Smile Using Navigation Control


    Sorry if repeating some thread, but I could not find solution ....
    I am using the new 2010 Navigation Form and need select the next (1>2, 2>3) button programatically ... i.e after performing some operations in the Subform, linked to NavButton1, to perform to open the Subform , linked to NavButton2 ... etc. as if as I have clicked NavButton 2.

    My code (that does;t work is:

    Forms!NavigationForm.Forms.Navigationbutton2_click
    Pleas, help

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,930
    Try:

    Forms!NavigationForm.Navigationbutton2_Click()

    or

    http://bytes.com/topic/access/answer...n-another-form
    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
    PlamenGo is offline Novice
    Windows XP Access 2010 32bit
    Join Date
    Jun 2011
    Location
    Bulgaria
    Posts
    22
    Thanks for the prompt response, but it does't work this way. even I tried to call the _Click from the NavForm, but it does not work. The NavigationForm has no code (I mean code I can access). Obviously there is some hidden event ....

  4. #4
    PlamenGo is offline Novice
    Windows XP Access 2010 32bit
    Join Date
    Jun 2011
    Location
    Bulgaria
    Posts
    22
    Forgot:
    The Error Message is "Sub or Function not defined!"

  5. #5
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,930
    Oh, yeah, I forgot that the NavigationForm wizard builds embedded macros. I don't use macros and avoid wizards. Might have to convert macros to VBA for what you want to do.
    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.

  6. #6
    PlamenGo is offline Novice
    Windows XP Access 2010 32bit
    Join Date
    Jun 2011
    Location
    Bulgaria
    Posts
    22
    Of course, but there is a small problem (for me) - I cannot see the macro ....

  7. #7
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,930
    Wait, I just tested building a navigation form. It did NOT create macros, didn't create any VBA procedures either. Look at the Click event of a tab of the navigation assembly. Anything in there?
    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.

  8. #8
    PlamenGo is offline Novice
    Windows XP Access 2010 32bit
    Join Date
    Jun 2011
    Location
    Bulgaria
    Posts
    22
    no, and that makes me .... thank you for the attention, I have to go to bed - it's 2AM here ... I will have to write to MS tomorrow ... or try to find another solution - the simplest is to disable all controls in the subform and trigger a message "Press tab 2 to continue", although I was trying to avoid this ....

  9. #9
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,930
    Need to write code to go with the button. Select [Event Procedure] in the event property. Double click the ellipses (...) and that will put you in the procedure in the VBA editor.
    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.

  10. #10
    PlamenGo is offline Novice
    Windows XP Access 2010 32bit
    Join Date
    Jun 2011
    Location
    Bulgaria
    Posts
    22
    I asked MSA (answers.microsoft.com) and got a reply that resolved my problem:

    "Use the browseto command.
    If you browseto a form that is included in the nav buttions, then that one becomes active.

    eg:

    DoCmd.BrowseTo acBrowseToForm,"Form3","Navigation Form.NavigationSubForm", "where condition"

    Note that if in say a choice of 5 nav buttons, you do NOT have form3 (as in the above example) then the current existing sub form will be replaced. However, if the 4th button is set to form3, then the above would display form 3, and the 4th button would highlight.
    And, as the above shows, you can add in a where clause.
    The above browse to command of course is available in both VBA as above, or as a macro command.
    This navagation feature is for web forms, but is a great choice for desktop also."

    Hope this to be useful for other developers too.

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

Similar Threads

  1. Replies: 10
    Last Post: 11-27-2016, 11:04 PM
  2. Navigation pane control!
    By karanvemuri in forum Access
    Replies: 5
    Last Post: 10-10-2011, 06:12 PM
  3. Navigation Form control syntax 2010
    By AndycompanyZ in forum Forms
    Replies: 2
    Last Post: 06-28-2011, 07:23 AM
  4. Control Navigation Bar
    By Patrick.Grant01 in forum Access
    Replies: 0
    Last Post: 05-17-2009, 06:16 AM
  5. Control navigation pane
    By ohporter in forum Access
    Replies: 0
    Last Post: 05-27-2008, 12:45 PM

Tags for this Thread

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