Page 1 of 2 12 LastLast
Results 1 to 15 of 18
  1. #1
    vaibhav28 is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Apr 2016
    Posts
    9

    Question Tab not working properly in datasheet subform

    Hi,

    I am trying to create a data entry form using datasheet subforms. After doing everything correct when I enter data, I successfully enter 1st record but if I try to enter second record the focus is always at the last column of datasheet. means if I keep using tab it will go out of form with touching only last column of every datasheet . Can anyone help with this, really stuck here as form is done and it has 10 tables/subforms.

    Thanks


    Vaibhav

  2. #2
    orange's Avatar
    orange is online now Moderator
    Windows 8 Access 2010 32bit
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,716
    Suggest you tell us in plain English what your database/business is about.
    Then tell us what your general approach to solving this will be.
    You could show us your intended/proposed tables and any forms you have set up/considered.

  3. #3
    vaibhav28 is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Apr 2016
    Posts
    9
    Quote Originally Posted by orange View Post
    Suggest you tell us in plain English what your database/business is about.
    Then tell us what your general approach to solving this will be.
    You could show us your intended/proposed tables and any forms you have set up/considered.
    This is about a survey I am conducting for a pilot/baseline study for Goats based livelihood in my area.
    I have created complete form as per my study.
    I have created relationships and added subforms to main form based on requirements.
    The problem is I am not able to perform sequential Tab function in subforms after entry of first record (Whole form). After entry of first record all subforms have their focus on last column of first row so if I start doing Tab, focus goes to the last cell which should ideally be first cell of subform. Please see attached image.

    First is about entering 1st Record
    in second you can see the focus in SubForm (Red Circle)

    I hope I am able to explain what is the issue.

    Thanks
    VaibhavClick image for larger version. 

Name:	First Record.jpg 
Views:	29 
Size:	209.2 KB 
ID:	24287Click image for larger version. 

Name:	Second Insert.jpg 
Views:	30 
Size:	205.8 KB 
ID:	24288

  4. #4
    davegri's Avatar
    davegri is online now Excess Access
    Windows 10 Access 2016
    Join Date
    May 2012
    Location
    Denver
    Posts
    3,389
    You need to edit your tab index properties for the subform. If you don't know what that means, Google 'access tab index'.

  5. #5
    vaibhav28 is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Apr 2016
    Posts
    9
    Quote Originally Posted by davegri View Post
    You need to edit your tab index properties for the subform. If you don't know what that means, Google 'access tab index'.
    Thanks for Help but I have already done that and all subforms are in sequence, no issues with that!!

  6. #6
    vaibhav28 is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Apr 2016
    Posts
    9
    Quote Originally Posted by vaibhav28 View Post
    Thanks for Help but I have already done that and all subforms are in sequence, no issues with that!!
    Any help on this!!

  7. #7
    Micron is offline Virtually Inert Person
    Windows 7 32bit Access 2007
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,737
    I'm not following. Are you saying when you tab out of the last subform datasheet you want it to go to the next record on the same datasheet? As far as I know, you cannot do that for datasheets without code (such as setting focus to a control with zero width and coding to shift the focus to where you want). Apparently, CTRL+TAB will allow you to jump out, but that's probably not intuitive to your users. To get to the next record, use the enter key and ensure the option for enter key navigation is set in the database Advanced Properties. If I didn't already mention it, I'm not sure what your issue is
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  8. #8
    davegri's Avatar
    davegri is online now Excess Access
    Windows 10 Access 2016
    Join Date
    May 2012
    Location
    Denver
    Posts
    3,389
    Try this. On the subform control on enter event, set the focus to the first column of the subform. That's the on enter event of the subform control that holds the subform. You can tell if it's the right control because it only allows 2 events; on enter and on exit.

  9. #9
    Micron is offline Virtually Inert Person
    Windows 7 32bit Access 2007
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,737
    Ps. Limit for number of subforms is 7.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  10. #10
    vaibhav28 is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Apr 2016
    Posts
    9
    Quote Originally Posted by Micron View Post
    Ps. Limit for number of subforms is 7.
    Are you sure about that because I do not see any logic in this.

  11. #11
    vaibhav28 is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Apr 2016
    Posts
    9
    Can you please let me know what should be syntax for such command.

  12. #12
    Micron is offline Virtually Inert Person
    Windows 7 32bit Access 2007
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,737
    What's not logical about having a limit for anything? Go here and scroll down to the reports section and look for Number of levels of nested forms or reports
    https://support.office.com/en-us/art...7-3e1fba6d6c96

  13. #13
    vaibhav28 is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Apr 2016
    Posts
    9
    Quote Originally Posted by Micron View Post
    What's not logical about having a limit for anything? Go here and scroll down to the reports section and look for Number of levels of nested forms or reports
    https://support.office.com/en-us/art...7-3e1fba6d6c96

    What I get from that is levels of nested forms like " Form within form within form within form.... till 7 levels" I do not believe that access tell us to limit number of subforms in a form. Nested Levels is a different concept altogether.

    Anyway but query isnt resolved even After I tried 7 forms. In fact I tried it with only one subform and problem is as it is.
    Let me phrase it again "When I enter a subform second time, the focus is on Last column of first row but I expect it to remain at first column of first row".

    I hope I made some sense here!!

  14. #14
    Micron is offline Virtually Inert Person
    Windows 7 32bit Access 2007
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,737
    Quote Originally Posted by vaibhav28 View Post
    What I get from that is levels of nested forms like " Form within form within form within form.... till 7 levels" I do not believe that access tell us to limit number of subforms in a form. Nested Levels is a different concept altogether.
    You are so correct. Don't know how I concluded you had them nested. Maybe it was the beer/scotch/rye/tequila/wine/vodka (obviously kidding - I have no vodka in the house).

    davegri might be on to a solution. Try that if you have not. The subform control Enter event should fire regardless of whether you click on a subform control or tab into it. As for the syntax, it can depend on how the subform control and its form have been named.

    Try this:
    Code:
    Forms![NameOfMainForm]![NameOfSubformControl].Form![subFormControlName].SetFocus
    While it may appear to be, the use of ! and . is not random here. You should not need the brackets if you've avoided spaces in the names, or have not started a control name with a number. Too much of that going on these days

  15. #15
    vaibhav28 is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Apr 2016
    Posts
    9
    Quote Originally Posted by Micron View Post
    You are so correct. Don't know how I concluded you had them nested. Maybe it was the beer/scotch/rye/tequila/wine/vodka (obviously kidding - I have no vodka in the house).

    davegri might be on to a solution. Try that if you have not. The subform control Enter event should fire regardless of whether you click on a subform control or tab into it. As for the syntax, it can depend on how the subform control and its form have been named.

    Try this:
    Code:
    Forms![NameOfMainForm]![NameOfSubformControl].Form![subFormControlName].SetFocus
    While it may appear to be, the use of ! and . is not random here. You should not need the brackets if you've avoided spaces in the names, or have not started a control name with a number. Too much of that going on these days
    I have tried below mentioned syntax on Enter and Exit Both but it is still stuck at the last cell of first row!!
    Private Sub tblFarmerLandDetails_Subform_Enter()
    Forms!tblGoatMaster!tblFarmerLandDetails.Form!tblF armerLandDetails.SetFocus
    End Sub


    Private Sub tblFarmerLandDetails_Subform_Exit(Cancel As Integer)
    Forms!tblGoatMaster!tblFarmerLandDetails.Form!tblF armerLandDetails.SetFocus
    End Sub



    I have more than 10 SubForms in Main form and it is happening in all of them When first form entry is complete. I feel like giving up now!! This is so frustrating

Page 1 of 2 12 LastLast
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Email Updates Not Working Properly
    By quirkyd in forum Import/Export Data
    Replies: 1
    Last Post: 10-26-2014, 09:24 AM
  2. Checkboxes not working properly
    By TK03 in forum Access
    Replies: 1
    Last Post: 12-24-2012, 09:04 AM
  3. Login form is not working properly
    By papa yaw in forum Forms
    Replies: 1
    Last Post: 12-19-2012, 05:25 PM
  4. Replies: 8
    Last Post: 08-26-2012, 11:11 PM
  5. Count or DCount Not Working Properly
    By Chris1112 in forum Forms
    Replies: 3
    Last Post: 05-09-2012, 02:51 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