Page 1 of 2 12 LastLast
Results 1 to 15 of 26
  1. #1
    cdub52 is offline Novice
    Windows 7 32bit Access 2013
    Join Date
    Jun 2014
    Posts
    15

    Unhappy Navigation Form Nightmare

    Hello,

    I've tried tons of different VBA to requery a combo box that is in a subform of my main navigation form. I always get a "438" error or Access says that it can't find a field. Some things that I've tried are:

    Forms!frmNavigation!frmMain.Form!frmOvertime.Form. txtEmpID.requery, and many other variations.




    Help is greatly appreciated!


  2. #2
    hapm is offline Competent Performer
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2014
    Posts
    197
    So what are the exact names for the navigation controls?

  3. #3
    cdub52 is offline Novice
    Windows 7 32bit Access 2013
    Join Date
    Jun 2014
    Posts
    15
    The main form is called Navigation Form
    The subform is NavigationSubform
    Then the form is FlavorSub

  4. #4
    hapm is offline Competent Performer
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2014
    Posts
    197
    I'm not interessted in the names of the forms, but in the navigation control names on the forms.

  5. #5
    burrina's Avatar
    burrina is offline VIP
    Windows 8 Access 2010 32bit
    Join Date
    Oct 2012
    Location
    Freeport,Texas
    Posts
    1,383
    Now you say FlavorSub ? Initially you said frmOvertime ??? On what form is txtEmpID on and is it a subform and on what event are you trying to use this code and on what form? One easy way is too create a temporary textbox on the form and use the Expression Builder to refer to the form/control that you need, then use this code to accomplish what you want.

    HTH

  6. #6
    cdub52 is offline Novice
    Windows 7 32bit Access 2013
    Join Date
    Jun 2014
    Posts
    15
    I was just using the names.....can you help me with where to find the navigation control names?

  7. #7
    cdub52 is offline Novice
    Windows 7 32bit Access 2013
    Join Date
    Jun 2014
    Posts
    15
    I was just using that string as an example, my form names are different. If I can't figure out this navigation form, then I will have to figure out something else. Thanks.

  8. #8
    hapm is offline Competent Performer
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2014
    Posts
    197
    To find the navigation control names go into your main forms design view, and click only once on the subform control. There should be a border around the complete subform. Then check the properties on the right.

  9. #9
    cdub52 is offline Novice
    Windows 7 32bit Access 2013
    Join Date
    Jun 2014
    Posts
    15
    Quote Originally Posted by hapm View Post
    To find the navigation control names go into your main forms design view, and click only once on the subform control. There should be a border around the complete subform. Then check the properties on the right.
    Did that, and it is called NavigationSubform.

  10. #10
    hapm is offline Competent Performer
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2014
    Posts
    197
    Is there another navigation control in you your first subform? If not, you should be able to access the control with Forms![Navigation Form]!NavigationSubForm.Form!txtEmpId if txtEmpId is the name of the control you want to access in your sub form.

  11. #11
    cdub52 is offline Novice
    Windows 7 32bit Access 2013
    Join Date
    Jun 2014
    Posts
    15
    This is the code I'm using now, but it says it can't find the field NavigationSubform....

    Me!NavigationSubform.Form!FlavorSub!ProdDescriptio n.Requery

  12. #12
    cdub52 is offline Novice
    Windows 7 32bit Access 2013
    Join Date
    Jun 2014
    Posts
    15
    Quote Originally Posted by hapm View Post
    Is there another navigation control in you your first subform? If not, you should be able to access the control with Forms![Navigation Form]!NavigationSubForm.Form!txtEmpId if txtEmpId is the name of the control you want to access in your sub form.
    That should work, right......it doesn't. Lame Access!

  13. #13
    cdub52 is offline Novice
    Windows 7 32bit Access 2013
    Join Date
    Jun 2014
    Posts
    15
    Quote Originally Posted by hapm View Post
    Is there another navigation control in you your first subform? If not, you should be able to access the control with Forms![Navigation Form]!NavigationSubForm.Form!txtEmpId if txtEmpId is the name of the control you want to access in your sub form.
    So I tried this, but it gave me the Parameter Box....

    Forms![Navigation Form]!NavigationSubform.Form!ProdDescription.Requery

    I think it wants another layer for the form in the subform which is called FlavorSub, but when I add that it says that it can't find it.

  14. #14
    hapm is offline Competent Performer
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2014
    Posts
    197
    If the navigation controls name is NavigationSubform then it should work. You don't need the subforms name as it is referenced by the Form property and not by its form name. Use the expression builder to build it up as burina suggested or provide the db with anonymized data as an attachment.

  15. #15
    cdub52 is offline Novice
    Windows 7 32bit Access 2013
    Join Date
    Jun 2014
    Posts
    15
    Quote Originally Posted by hapm View Post
    If the navigation controls name is NavigationSubform then it should work. You don't need the subforms name as it is referenced by the Form property and not by its form name. Use the expression builder to build it up as burina suggested or provide the db with anonymized data as an attachment.
    What's the best way to post the attachment?

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

Similar Threads

  1. Dsum nightmare
    By noop71 in forum Access
    Replies: 3
    Last Post: 01-18-2013, 11:48 AM
  2. Corruption nightmare
    By Remster in forum Access
    Replies: 4
    Last Post: 03-25-2011, 06:40 AM
  3. help with combo box nightmare
    By Bigthinkor in forum Access
    Replies: 2
    Last Post: 01-13-2011, 10:28 PM
  4. Tabbing nightmare
    By Remster in forum Forms
    Replies: 3
    Last Post: 11-24-2010, 11:35 AM
  5. 1 to many nightmare
    By damian_gareau in forum Access
    Replies: 0
    Last Post: 07-11-2007, 12:10 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