Results 1 to 10 of 10
  1. #1
    Ossos is offline Novice
    Windows 7 64bit Access 2013 64bit
    Join Date
    Oct 2016
    Posts
    14

    Show Valuees from Subform in MsgBox


    I received this Run-time error 2465 " MS Access can't find the field "3_FAcrRoomSubForm" refered to in your expression" every time run "CmdFacRoomEdit"

    The Attached File illustrate the complete syntax

    I want the MsgBox for a value of MedFacRoomNo (Named in Other Tab as "TxtRoomNo") in the SubForm 3_FacRoomSubForm but...

    Regards
    Click image for larger version. 

Name:	Msgbox1.jpg 
Views:	17 
Size:	228.1 KB 
ID:	26055

  2. #2
    jwhite is offline Competent Performer
    Windows 10 Access 2013 32bit
    Join Date
    Dec 2012
    Location
    North Carolina
    Posts
    349
    Please verify that the actual Name of the Subform Control on the Main Form is as referenced in your code. Looks like it has an extra r before Room.

  3. #3
    Ossos is offline Novice
    Windows 7 64bit Access 2013 64bit
    Join Date
    Oct 2016
    Posts
    14
    I check everything, that is why I sent a snap shot from my screens,

  4. #4
    aytee111 is offline Competent At Times
    Windows 7 32bit Access 2013 32bit
    Join Date
    Nov 2011
    Location
    Nomad
    Posts
    3,936
    Remove the ".Form"

  5. #5
    jwhite is offline Competent Performer
    Windows 10 Access 2013 32bit
    Join Date
    Dec 2012
    Location
    North Carolina
    Posts
    349
    Posting an image isn't helping us that much... The error message quoting "3_FAcrRoomSubForm" means you have that erroneous value stated somewhere. Please post a copy of your database with confidential data removed.

  6. #6
    John_G is offline VIP
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2011
    Location
    Ottawa, ON (area)
    Posts
    2,615
    In the MsgBox Forms!..., use the name of the Control, not the name of its record source:

    Forms![3_FacRommMainForm]![3_FacRoomSubForm].Form!txtRoomNo

  7. #7
    Ossos is offline Novice
    Windows 7 64bit Access 2013 64bit
    Join Date
    Oct 2016
    Posts
    14
    I am afraid that, I am still receiving the same error

  8. #8
    jwhite is offline Competent Performer
    Windows 10 Access 2013 32bit
    Join Date
    Dec 2012
    Location
    North Carolina
    Posts
    349
    I understand, but you need to tell us what you have actually done with our suggestions, or provide the database as requested. What I am referring to is highlighted in the screenshot attached. You will notice that the "Source Object" name (stored form name) is DIFFERENT from the "Name" name. In this case my Forms statement would have frmArticleDetails instead of frmArticles_Subform.
    Click image for larger version. 

Name:	1.png 
Views:	12 
Size:	14.2 KB 
ID:	26070

  9. #9
    John_G is offline VIP
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2011
    Location
    Ottawa, ON (area)
    Posts
    2,615
    On your main form, what is the name of the control that contains the subform? Not the name of the subform - the name of the control.

  10. #10
    orange's Avatar
    orange is offline Moderator
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,870
    Also, you could post a copy of your database (in zip format)?

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

Similar Threads

  1. Replies: 2
    Last Post: 10-13-2015, 10:03 AM
  2. Replies: 4
    Last Post: 11-20-2014, 01:05 PM
  3. Replies: 4
    Last Post: 04-03-2014, 08:03 AM
  4. Replies: 1
    Last Post: 04-24-2013, 12:12 PM
  5. Show certain records only on subform
    By JayGee1969 in forum Forms
    Replies: 36
    Last Post: 09-13-2012, 07:37 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