Results 1 to 6 of 6
  1. #1
    Join Date
    May 2006
    Posts
    30

    Unanswered: clear subform on new record

    I got my subform (subTool) to open to a new record when the form (Form2) is first opened. But what I'm running into right now is that when I am on a
    previous record and click the New Record button in the navigation bar, the
    old info stays in the subform. How can I go about getting the subform to
    clear also when the user navigates to a new record?

    Thanks!
    Seren

  2. #2
    Join Date
    Nov 2003
    Location
    Netherlands
    Posts
    85
    Try a requery on the subform which is triggered when you move to an other record

  3. #3
    Join Date
    May 2006
    Posts
    30
    I tried that and it was not working. I decided to take off the navigation buttons at the botton and add my own Add Record button that sets the form and the subform to a new record. The problems I'm having now:

    #1. The only jobs that show tool numbers now are those linked to one specific toolId (#4 to be exact).

    #2. It seems I am no longer allowed to add a new record. Once I enter all of the information, and then try to click the Add New Record button or navigate away from that just-added entry, it says "The changes you requested to the table were not successful because they would create duplicate values in the index, primary key, or relationship. Change the data in the field or fields that contain duplicate data, remove the index, or redefine the index to permit duplicate entries and try again." This actually is only when I try to add a new tool number. If I create a new job number and use an existing tool number, it's fine. Also, I have alerts that pop up if there is a duplicate job number (user is redirected to that record) or a duplicate tool number (tool info is then populated in the subform within the new job number.)

  4. #4
    Join Date
    Nov 2003
    Location
    Netherlands
    Posts
    85
    do you store the data in 1 table or in 2 different tables like tools and subtools

  5. #5
    Join Date
    May 2006
    Posts
    30
    there are two tables: tblJob for main form and tblTool for the subform.

  6. #6
    Join Date
    Nov 2003
    Location
    Netherlands
    Posts
    85
    Is the relation between tblJob and TblTool something like tbljob_pk has a relation with tbljob_fk as a field in tblTool while tblTool has his own tblTool_pk?
    If you like you can upload de mdb and maybe I can help out.

Posting Permissions

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