Enter Data into a Subform with another Form instead of an Input box

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • yashuaking
    New Member
    • Sep 2013
    • 46

    Enter Data into a Subform with another Form instead of an Input box

    I once posted an issue on this platform concerning entering data into a subform with an input box and was advised to rather use another form to enter data into the subform instead of an input box. I am writing a database program and I have seen the relevance of this advise. I realize that using another opened form to enter data into the subform is the best but am stuck. How do I reference the subform on this opened form which is totally separate from the Subform and its main form.

    I tried but it did not work out
    This is how I referenced the subform on the one am using to enter the data.
    Code:
    forms![LibraryF].[LibraryOrderSch]!ISBN = Me.SerialNumber.Value

    The subform is a continues which I do not want users to enter data directly into but rather provided a command button which calls another form for the data entry.

    The Subform is called LibraryOrderSch which is in a main form called LibraryF. The form I using for the data entry is called Library Order Form

    Am stuck and need help.
  • twinnyfo
    Recognized Expert Moderator Specialist
    • Nov 2011
    • 3653

    #2
    First, if the subform is continuous, you will have a heap of headaches, as I believe you may end up changing all the records, not just one.

    Second, to reference another subform on another form, the syntax is:

    Code:
    Forms!FormName.SubFormName.Form.ControlName
    Remember, if your Form Names have spaces, to enclose the names with Brackets "[]". Some say the ".Form." is redundant and/or unnecessary, but I always include it, as I have had some problems with Access disambiguating some things.

    Hope this hepps!

    Comment

    • jforbes
      Recognized Expert Top Contributor
      • Aug 2014
      • 1107

      #3
      This might help you also, it is a cheat sheet on how to reference Form Objects from all kinds of different places:http://access.mvps.org/access/forms/frm0031.htm

      Comment

      • twinnyfo
        Recognized Expert Moderator Specialist
        • Nov 2011
        • 3653

        #4
        J,

        Great link! Useful in so many ways!

        Comment

        • yashuaking
          New Member
          • Sep 2013
          • 46

          #5
          Thanks very much. I am giving it a try.

          Comment

          • yashuaking
            New Member
            • Sep 2013
            • 46

            #6
            Thanks for the link that you have sent. I am checking it out.

            Comment

            • yashuaking
              New Member
              • Sep 2013
              • 46

              #7
              Thank you all for the help I used another work around to achieve the results by looking at the link you provided. Thank you very very much. It has really solved my problem

              Comment

              • twinnyfo
                Recognized Expert Moderator Specialist
                • Nov 2011
                • 3653

                #8
                yashuaking,

                Could you please provide the workaround, so that others with similar issues would be able to benefit from your solution.

                Thanks!

                Comment

                Working...