Results 1 to 4 of 4
  1. #1
    offie is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jun 2013
    Posts
    176

    Problems with finding texboxes, is there a way to show what a [Form]!... ect returns?

    I am using navigations form so the names are tricky to start with, for some reason when I refer to textbox in one form, this is in the same place as another texbox (that I can find and works as criteria) it just doesn't work.

    So my question is, are there ways of testing to see what the output of a [Form]!.., etc. is?



    Or better yet, a way that access gives you the name of the place where it is?

    Thanks!

  2. #2
    Dal Jeanis is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2013
    Location
    Dallas TX
    Posts
    1,742
    First, if you're using navigation forms, I believe you have to remember that only the open form is loaded, so there's nothing to refer to on any other form.

    Second, as long as the form is open, you can open the immediate window (alt-pf11) and type in
    Code:
    debug.print [forms]![whateverlongthingyou].Form![thinkwillwork].Name
    and if you got it right, then it will type out the name of the control.

    You can also use debug.print to walk from the control upward.

    In control List0's afterupdate, you can have
    Code:
    debug.print Me.List0.name
    debug.print Me.name
    which will print List0, then the name of the form List0 is on. If it's on a subform, then
    Code:
    debug.print Me.Parent.name
    will get the name of the parent form.

    This site is a wonderful reference for how to refer to controls and forms on other forms/subforms.
    http://access.mvps.org/access/forms/frm0031.htm

  3. #3
    offie is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jun 2013
    Posts
    176
    Exactly what I was looking for, thanks!

  4. #4
    Dal Jeanis is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2013
    Location
    Dallas TX
    Posts
    1,742
    You're welcome. Please mark the thread "solved". Top of page, under "thread tools".

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

Similar Threads

  1. form returns records not in record source
    By aussie92 in forum Forms
    Replies: 2
    Last Post: 01-14-2013, 11:23 AM
  2. Replies: 2
    Last Post: 03-30-2012, 08:26 AM
  3. Replies: 4
    Last Post: 02-22-2012, 12:43 PM
  4. Dlookup in form returns #error
    By RickM in forum Access
    Replies: 1
    Last Post: 03-29-2010, 07:59 PM
  5. trying to add color to texboxes
    By michaelpclisbee in forum Forms
    Replies: 2
    Last Post: 07-04-2009, 02:45 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