Results 1 to 14 of 14
  1. #1
    Lounger
    Join Date
    Sep 2001
    Posts
    41
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Form won't save correct subform? (A2K Pro)

    This form has tab control pages. On page one is a Parent Subform. On page six is a Service Subform. It works fine until I save it. When I save the Form, it converts the Service Subform to the Parent Subform.

    Probably an easy answer, but I am stuck.

    Thanks

  2. #2
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Form won't save correct subform? (A2K Pro)

    Sorry but I don't understand. When you save what, the form or a record? Forms don't convert subforms to anything unless you tell them to, and what do you mean by a Parent subform? The parent form is the form that contains the tab control and all subforms. Do you have a subform on Page 1 that has another subform nested in it? When you save the form, are you saying that you then see the "Parent Subform" on page 6 as well as on Page 1?

    Are the subforms bound to the pages or are they bound to the parent form? It makes a big difference in the way they display and behave.
    Charlotte

  3. #3
    Lounger
    Join Date
    Sep 2001
    Posts
    41
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Form won't save correct subform? (A2K Pro)

    Thank for replying to my problem. I have been trying to solve it all day!!!

    When I make changes to the form and save it, it changes on the save. I am not entering data or changing records. Just want to get this form to work.

    First confusion factor. The main form is about Student Data. the Subform on page one of the Tab control is about (Parent's Names, not a parent form) I can see how this gets confusing.

    The subform on the page six of the tab control is about Services given to the Student.

    They are not nested within each other.

    Things I have tried.
    I have removed the child and master links on both subforms and related them directly from the queries to the Student ID.

    I have placed one of the subforms out in the main form, not in the tab control.

    If I change the form to the correct subform, save it without closing the form it will work in view form. Until I close and reopen the form. Then the parent's name subform is replacing the service subform on page 6. Basically it puts the same two subforms on the page 1 and 6.

    I compiled the data and it didn't work.

    I am stumped.

    HELP!!!

  4. #4
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Form won't save correct subform? (A2K Pro)

    Paste the subforms to the pages of the tab control instead of placing either of them on the main form. Whatever is on the main form will float to the top unless you hide it, so it will obscure whatever is on the other pages. If you paste the subforms to the individual pages, then whichever page you click on will display its subform and you'll stop confusing yourself.
    Charlotte

  5. #5
    Lounger
    Join Date
    Sep 2001
    Posts
    41
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Form won't save correct subform? (A2K Pro)

    Charlotte,

    Ok, I understand what you are saying, but I have the subforms on individual pages.

    More trials

    I totaly removed the Parents subform, it works.

    If I put the parents subform onto the same page as the service form it works until I close or redesign the form...then it changed the Parent subf to the Service Subf (which is exactly opposite of my first way.)

    I put the parents subform onto the main form at the bottom. Same problem.

    I moved page 6 to the front. Same problem.

    It doen't obsure the visibility of the subforms, it actually changes the "Source Object" in the properties of the subform.

    Still puzzled...still REALLY appreciating any comments.

  6. #6
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Form won't save correct subform? (A2K Pro)

    What do you mean by putting the Parent subform on the same page as the Service subform? Are you pasting both of them to the same page or what? I'm having trouble visualizing exactly what you're doing.

    I have many forms with multiple subforms on several tab pages and have never seen the behavior you describe, which suggests it might be something you're actually doing, either manually or in code, that is the culprit. Moving pages has nothing to do with anything. That just determines the order the tabs come in.

    If the sourceobject is being changed, then you're doing something that causes it, even if you don't realize it. Is there code in your tab control's OnChange event that does any manipulation of the subforms? The only other possibility is that you have a seriously corrupted form, and only rebuilding it would cure that.
    Charlotte

  7. #7
    Lounger
    Join Date
    Sep 2001
    Posts
    41
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Form won't save correct subform? (A2K Pro)

    I'm trying everything. I even made a completely new form with no tab controls. I (drag and drop) both subforms onto the detail section....same problem.

    I too am looking beyond the form. Relationships? Could they cause the problem? Do I have an Tools/options set wrong somewhere.

    I will try to rebuild both subforms from scratch again.

    Again, thanks. Don't give up on me.

  8. #8
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Form won't save correct subform? (A2K Pro)

    What do you mean "both subforms on the detail section"? Are you pasting them one over the other? If I do that and save the form, when I reopen it in design mode, the second subform is pasted on top of the first one but they're both there. Are you seeing something different?
    Charlotte

  9. #9
    Lounger
    Join Date
    Sep 2001
    Posts
    41
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Form won't save correct subform? (A2K Pro)

    I am pasting them next to each other. If I save the form and reopen in design mode, both subforms are still there but they are now changed to have the same source object.

  10. #10
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Form won't save correct subform? (A2K Pro)

    Then there's something seriously wrong with either your installation or your database. That is *not* normal or even mildly eccentric behavior for Access. Each subform should retain its own source object. Have you tried creating a new database and importing all the objects into it? Does this behavior appear in any other database?
    Charlotte

  11. #11
    Lounger
    Join Date
    Sep 2001
    Posts
    41
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Form won't save correct subform? (A2K Pro)

    I am new to Access 2000, having worked in Access 97 for a long time. This is my first DB in 2000 version.

    I am also running A97 on this computer and have been referring to another DB I built in that program because it had a lot of subforms.

    Question...If I built the DB on my version of AK2000 will it have the same problems if I take it to another computer with AK2000?

    The data was originally transferred by me from a A97 database. The objects have all been recently built by me.

    I will try to build another easy database and some quick subforms to check. I'll let you know.

    I was just going to ask you if I should reinstall Access 2000. If I use the same CD it came on, will the problem still be there?

  12. #12
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Form won't save correct subform? (A2K Pro)

    Running both versions shouldn't be a problem. I have them both on my machines. If the database itself is the source of the problem, then it will misbehave on any machine you take it to. Since other forms you create in this database show the same symptoms, you're going to have to pull the plug on that database. If this is the only database on your machine behaving like this, then creating a new mdb and importing the objects is the place to start.

    Before you do a reinstall, make sure that the problem is not exclusive to that database. If they all act that way, then a reinstall is definitely recommended, and even that may not be enough if the databases themselves are corrupt. If only one acts like that, then the problem is in the database and you may be able to cure it by creating a new database and importing all the objects. If you converted the database from A97, rather than just importing all the objects, you may have to remember to tweak the references so that your code isn't trying to use DAO objects with an ADO reference.

    You never said if you had a service release installed. If you don't have at least SR-1a, then get it from Microsoft and install it. That probably has nothing to do with your problem, but it will eliminate other problems that you may not have run into yet.
    Charlotte

  13. #13
    Lounger
    Join Date
    Sep 2001
    Posts
    41
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Form won't save correct subform? (A2K Pro)

    I have seen it misbehave on the 2 other computers. I just worked a small completely different DB in AK2000 with two subforms, tab controls, the works. It did fine.

    So...I am assuming it is my database not the Access 2000 program.

    I only began with data, no objects. The tables are linked. Do I need to move those also?

    DAO objects versus ADO is new to me. If I am only building in 2000, will that be a problem? Can you send me somewhere to read up on the differences.

    I have SR-1 but not SR-1a. Thanks.

    I have to get to a high school football game. Both my older girls are performing on the sidelines. I will update you ASAP.

  14. #14
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Form won't save correct subform? (A2K Pro)

    The only way you can tell the differenced between SR-1 and 1a is by the builds on the individual dlls. You ought to be OK with SR-1, especially since the out of the box version of SR-1 is actually SR-1a. <img src=/S/shrug.gif border=0 alt=shrug width=39 height=15>

    If you only began with data, try linking to the data, since it's most likely the front end that went haywire. I'm assuming that the backend is in Access 2000. If it's in 97, convert it. Access 2000 turns in absolutely rotten performance against a 97 backend.

    DAO was the object model through 97. It is still available (and necessary for some things) in Access 2000, but it is no longer the default object model. ADO is an entirely *different* object model, but some of its objects have the same names as DAO objects, so Access gets confused if you have both references checked and don't specifically declare your objects as DAO.Database or DAO.Recordset or ADODB.Recordset.

    If you're used to working in DAO, you can keep doing that while you get your mind around ADO. There are white papers on the Microsoft site on migrating from DAO to ADO, and I recommend them. There are also some excellent books out there, including The Visual Basic Developers's Guide to ADO, by Mike Gunderloy, along with several others that have been recommended in other threads here in the Access forum.
    Charlotte

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •