Results 1 to 7 of 7
  1. #1
    2 Star Lounger
    Join Date
    Aug 2001
    Posts
    116
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Form/SubForm Error (Access 2000)

    I'm having an annoying Form/SubForm problem that I'm looking for pointers on troubleshooting.
    My subform is retaining the information from the previous form instead of clearing itself for a new record. Any suggestions?

    TIA

  2. #2
    Super Moderator
    Join Date
    Jun 2002
    Location
    Mt Macedon, Victoria, Australia
    Posts
    3,993
    Thanks
    1
    Thanked 45 Times in 44 Posts

    Re: Form/SubForm Error (Access 2000)

    Do you have the Link Master and Child Fields properly set?

    If you use the form to look at old (existing) data does it behave properly, and show the right data?

    When you use it to add new records, does the data go into the tables the way you want?
    Regards
    John



  3. #3
    2 Star Lounger
    Join Date
    Aug 2001
    Posts
    116
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Form/SubForm Error (Access 2000)

    Do you have the Link Master and Child Fields properly set?
    <font color=blue>Yes</font color=blue>
    If you use the form to look at old (existing) data does it behave properly, and show the right data?
    <font color=blue>No</font color=blue>
    When you use it to add new records, does the data go into the tables the way you want?
    <font color=blue>No</font color=blue>


    Arrgh! Some days ...

  4. #4
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,594
    Thanks
    0
    Thanked 27 Times in 27 Posts

    Re: Form/SubForm Error (Access 2000)

    What is your table structure for both the form and subform. And what are the Master/Child links?

    As John points out, if you don't have your Master/Child links set correctly then you will not see the linked data correctly.

  5. #5
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Form/SubForm Error (Access 2000)

    I'm afraid we don't have enough information about the way your form and subform are set up. Can you tell us a bit more about the record source of the main form and of the subform, and about the fields used to link them?

  6. #6
    2 Star Lounger
    Join Date
    Aug 2001
    Posts
    116
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Form/SubForm Error (Access 2000)

    I think I'm figuring out what the problem is - or at least what started it in the first place.
    Each item with its' serial number has a series of pieces.
    The item comes through the door and is broken down into those pieces, and of course, the number of pieces is not consistent from item to item.
    So, I have an Item Table and a Pieces Table. The serial number forms the Master/Child link between them.
    What I am trying to do is generate a unique ID for each piece, based on the serial number of the item, date the item came through the door and and alpha label for each piece.
    That's where things appear to go bad. I'm thinking that a solution might be to have the date appear in both tables.

    TIA

  7. #7
    2 Star Lounger
    Join Date
    Aug 2001
    Posts
    116
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Form/SubForm Error (Access 2000)

    I think I've solved the problem - I had the setvalue macro creating the piece's ID tied to a field inside the subform. It was trigged to early, causing error messages. Then in my flailing about to solve the problem, I caused a worse one(no - I have figured that out yet). I'm blaming it on an office filled with chatty people <img src=/S/grin.gif border=0 alt=grin width=15 height=15>.
    So, solution - tie the setvalue macro to the subforms' BeforeUpdate event.

    Thanks to everyone for their help.

Posting Permissions

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