Use a control on a Form as the Record Source for a control on a Different Form?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • CharT
    New Member
    • Sep 2011
    • 22

    Use a control on a Form as the Record Source for a control on a Different Form?

    Hello, Using Access 2010...

    I can't get this to work and it seems as if it should be :)
    I have a text box on a form, which is a subform on a main form. The main form is Child Info, the subform is called AdultList, and the subform control is called AdultSFCont

    I would like the value of the control Adult ID on the subform AdultList to magically appear in a control on a different form.

    I have set the record source to =[forms].[AdultList]![Adult ID] but all i get is the #Name? error.

    Can anyone help me? Thanks!
  • NeoPa
    Recognized Expert Moderator MVP
    • Oct 2006
    • 32633

    #2
    See Referring to Items on a Sub-Form but you're probably looking for something like :
    Code:
    =Forms![Child Info]!AdultSFCont![Adult ID]

    Comment

    • CharT
      New Member
      • Sep 2011
      • 22

      #3
      Hello, thanks for the quick update- after I made the change to my form, saved and closed the db for a bit, and went to reopen and it keeps crashing... any suggestions of what would cause this? The error is: Microsoft Access has encountered a problem and needs to close. We are sorry for the inconvenience.

      It just keeps going in circles backing up and crashing... :(

      Comment

      • NeoPa
        Recognized Expert Moderator MVP
        • Oct 2006
        • 32633

        #4
        It sounds like a corrupted database. There is no further information to work on than the error message I suppose?

        That sounds like a situation where you create a new blank database and import as many objects as you can that will work. Everything else will need to be recreated.

        That's assuming you don't have any backups of course. A backup enables you to start from a much more recent position and save yourself a ton of work.

        I'm afraid it's not good news whichever way you look at it though.

        Comment

        • CharT
          New Member
          • Sep 2011
          • 22

          #5
          hmmm... would using an incorrect way of linking controls cause that? Maybe I did something wrong? I do have a backup that is only 1 day old, so not too much trouble, but I sure would like to know what causes this so i can try to avoid it again!

          Comment

          • NeoPa
            Recognized Expert Moderator MVP
            • Oct 2006
            • 32633

            #6
            I wouldn't have thought so. Access does have a bit of a reputation for getting itself corrupted I'm afraid. Any time connection is lost to the database file there is potential for such problems. As this is quite frequent when dealing with databases across almost any type of network, it's not too rare an occurrence I'm sorry to say.

            Comment

            • CharT
              New Member
              • Sep 2011
              • 22

              #7
              Hmmm that's a bummer... Maybe this should be a new thread?

              My brother is a pretty darn good programmer (he set up Bhutan (the country) on a solar powered wireless network that he designed and built and he works for companies that he can't even tell me about...)and he says "life's too short for MS" he seems to think that MS Access has a lot of faults, but, i have to say, for me it's worked well because I am not a programmer and yet, I have created a db that works...

              But, the question for me is, when it's time for this db to go into full use over a network am I going to have to ditch MS Access and find another program? Are there any improvements to Access in the works that will make it more stable?

              At the moment both the back end and the front end are on my local hard drive, no network involved as of yet, and I get these corruption issues from time to time. I just wanted to make sure it wasn't something I was doing wrong...

              Char T

              Comment

              • NeoPa
                Recognized Expert Moderator MVP
                • Oct 2006
                • 32633

                #8
                Corruptions occur mainly due to processes not being correctly finished off. That can occur from disconnections, but it can also occur, I believe, from poor design.

                I'm no real expert at this as I've experienced very few in my years of working with Access, but they can be painful when they do occur. I always tried to ensure my databases were only ever run over a LAN as far as networking goes. WANs, I would say, are fundamentally not suited to running Access projects.

                As for deciding whether Access is good enough for your task, that is something you will need to consider. Many people are anti-MS & anti-Access when they have very little real understanding of the isuues. Mostly just prejudice and listening to gossip. There are many who know the situation better who also have serious misgivings though - in some areas particularly. I certainly wouldn't use it in all scenarios for instance, though frankly I would try to get around the problems if I could as, just as you've discovered for yourself, it's a pretty darn good tool for database work - particularly as a Front-End. If you start again using other tools I doubt you'll get so far so quickly.

                Comment

                Working...