Page 2 of 2 FirstFirst 12
Results 16 to 26 of 26
  1. #16
    trevor40's Avatar
    trevor40 is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Feb 2014
    Location
    Australia
    Posts
    407
    Did that work for you?

  2. #17
    zareh is offline Novice
    Windows 7 64bit Access 2003
    Join Date
    Jan 2013
    Posts
    29
    So far I managed to identify and store the name of the field which had the focus on the sub form before the sub form losses the focus.

    Now I need to set the focus to that field :

    Forms(aaa).Forms(bbb).Controls(ccc).SetFocus

    aaa is the main form name (variable)
    bbb is the sub form name (variable)
    ccc is the field name in the sub form (variable)

    NOW this does not work!!!!????

    Any ideas?

  3. #18
    trevor40's Avatar
    trevor40 is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Feb 2014
    Location
    Australia
    Posts
    407
    just got here, but try gotocontrol...

  4. #19
    trevor40's Avatar
    trevor40 is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Feb 2014
    Location
    Australia
    Posts
    407
    docmd.gotocontrol "your field name here"

    or you could try reopen or make visible the form/subform again and on the onopen command check for your field name on the main menu if it's there use that in the above line to go to the required field. you will need to play around with the variables.

  5. #20
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows XP Access 2003
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,614
    You could also try:
    Me.bbb.Form.ccc.Setfocus
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

  6. #21
    zareh is offline Novice
    Windows 7 64bit Access 2003
    Join Date
    Jan 2013
    Posts
    29
    Thanks everybody. It seems that it's going to work. I am getting there!! I will keep you informed. Cheers

  7. #22
    zareh is offline Novice
    Windows 7 64bit Access 2003
    Join Date
    Jan 2013
    Posts
    29
    This job is making me crazy!!!!!!!!!


    PLEASE PLEASE have a look at the attached file. I explained what happens on the FRM1 form (label).

    I hope hope hope someone can tell me whats wrong.


    Thanks
    Attached Files Attached Files

  8. #23
    zareh is offline Novice
    Windows 7 64bit Access 2003
    Join Date
    Jan 2013
    Posts
    29


    Somebody .................................Please.!!!!!!!!!! !!!!!!!

  9. #24
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows XP Access 2003
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,614
    A search in Google suggests that your problem has been encountered by others before you. It would seem that the problem lays with setting the focus. The general consensus of opinion would seem to be that it is better to either create a “Find” button which will open a dialog window in which the text to be searched for, the field to be searched and the direction, can all be selected. The alternative is to set a filter on the sub form.
    Take a look at the attached db. It does not solve the issue you had but it may help to show you how the alternative suggestions might work.
    Attached Files Attached Files
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

  10. #25
    zareh is offline Novice
    Windows 7 64bit Access 2003
    Join Date
    Jan 2013
    Posts
    29
    Thanks a lot for the reply.

    Appreciate your time.

    Cheers

  11. #26
    MarvinM's Avatar
    MarvinM is offline Advanced Beginner
    Windows 7 64bit Access 2007
    Join Date
    Dec 2013
    Posts
    30

    Thumbs up Identifying the field in a subform - Syntax Help

    Found this in another forum. It was written long ago, but still is very useful.
    Syntax for Subforms.zip

    It's not easy to upload a simple Word doc here, is it?

    _________________
    Regards,
    Marvin M
    Windows 7 Professional, MS Access 2007/2010
    Windows 8 Professional, MS Access 2013
    -------------------------------------------------------------------------------------------------------------------
    If this post has helped you, please click on the little sheriff badge in the lower left corner. Thanks!
    -------------------------------------------------------------------------------------------------------------------

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

Similar Threads

  1. Identifying the Parent Page in a subform
    By EddieN1 in forum Forms
    Replies: 5
    Last Post: 08-01-2013, 05:13 PM
  2. Identifying where two tables are different
    By Bdowns in forum Queries
    Replies: 1
    Last Post: 01-17-2013, 01:23 PM
  3. Need help identifying what to do....?
    By shands in forum Access
    Replies: 7
    Last Post: 09-29-2011, 11:49 AM
  4. Identifying the first entry
    By HelenP in forum Access
    Replies: 8
    Last Post: 10-20-2010, 08:31 PM
  5. Identifying new data
    By manicamaniac in forum Programming
    Replies: 5
    Last Post: 04-28-2010, 11:08 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