Results 1 to 7 of 7
  1. #1
    Jamesy_007 is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Mar 2020
    Location
    Caribbean
    Posts
    99

    Display Info from a Sub form unto the Main Form

    Good Day Everyone.



    I have this main form with relevant information also Sub Forms in Tabs linked to the MainForm. However there's this particular field in one of the subforms called lets say AdditionalInfo whose data type is LongText; simple the characters can be more than 255. But this is my theory "I want this info displayed on the main form in a unbound txtbox in sticky-notes type object" reasons its difficult to read in the sub form in datasheet view, also the information can change as new records are added to this particular subform I've tried these Steps..... Step 2 works but not quite

    Step 1... cut and paste the subform field into the mainform ....nope!

    Step 2... =Control Source to the subform Field.... this only worked when I added the particular table of the same subform to the "Record Source[Query Builder]" meaning it displayed but not when I changed the record to a next row of information remember sub-form is in datasheet view

    Step 3... Tried to format a dlook up function it didn't work =DLookup("[AdditionalInfo]", "tblCourtDate", "[Inm_pk] =" & Forms![frmCourtDates]!Inm_pk) i.e. tried to bound this function to the sticky notes type object

    Can anyone give suggestions or point out where am wrong ???

  2. #2
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,800
    Methinks should work if you get the reference syntax right for control source property of this 'notes' textbox on the main form. Maybe
    Code:
    = Forms!FormNameHere!SubformControlNamehere.Form.ControlNameHere
    I mention that because I have no idea what "Control Source to the subform Field" looks like in your case. You should always post your attempted code, expressions or references to get more focused responses. Won't work if the subform doesn't load though.
    Last edited by Micron; 06-30-2021 at 06:36 PM. Reason: code correction
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  3. #3
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    4,933
    Use the Builder to get the correct syntax?
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

  4. #4
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,800
    That actually works for setting the control source on the main form to reference a field on the subform. In my answer, I went by the subforms reference syntax I learned some time ago because I like to do things the hard way! Tested, and I ended up with this syntax:
    =[SubformControlName].[Form]![controlName]

    Odd that you can't remove the brackets though.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  5. #5
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,977
    As an alternative approach, you could have a popup form similar to a zoom box which appears when you click on the long text field in the subform
    Last edited by isladogs; 07-01-2021 at 06:28 AM.
    Colin, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I don't know, I keep quiet!
    If I don't know that I don't know, I don't know whether to answer

  6. #6
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,800
    also Sub Forms in Tabs linked to the MainForm.
    I might have misinterpreted that to mean that the goal was to have the info on the main form visible even when some other tab page was showing a different form. If not, I agree that a zoom box is the way to go.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  7. #7
    Jamesy_007 is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Mar 2020
    Location
    Caribbean
    Posts
    99
    Quote Originally Posted by Micron View Post
    I might have misinterpreted that to mean that the goal was to have the info on the main form visible even when some other tab page was showing a different form.
    Yeah! this was a theory, not sure how practical but the overall goal is to get this info displayed visible clear and not in datasheet view, where the Field AdditionalInfo is; being apart of the sub form

    Quote Originally Posted by Micron View Post
    Code:
    = Forms!FormNameHere!SubformControlNamehere.Form.Con trolNameHere
    This didn't do the trick will try the zoom type form because its not necessary that the info displays when the main form is open but as the records of that particular subform change will like that the information to show visible and clear to the user



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

Similar Threads

  1. Replies: 3
    Last Post: 03-17-2014, 12:51 PM
  2. Display info from parent form in child form
    By Leonidsg in forum Forms
    Replies: 3
    Last Post: 03-23-2013, 07:14 PM
  3. display/add new info on a form
    By dgamma3 in forum Access
    Replies: 1
    Last Post: 01-22-2012, 02:54 PM
  4. Replies: 35
    Last Post: 12-21-2011, 02:16 PM
  5. copy info in subform as well as main form
    By Coolpapabell in forum Forms
    Replies: 0
    Last Post: 09-30-2009, 10:02 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