Results 1 to 6 of 6
  1. #1
    Join Date
    Aug 2002
    Posts
    78

    Unanswered: Continual Data Entry

    I am currently working on a database that tracks dog pedigrees (family tree). I have a form that I enter dog (Star), Sire (father)Jake, and Dam (mother)Shadow. When completing the form it stop at the information. Meaning.

    I enter Star's information and when I get to end of form, instead of rolling to next record (Jake) . . . I have to close the form and reopen to get to Jake's and Shadow's (Star's parents) record.

    Is there a way to "refresh" the form and table so I don't have to keep closing and reopening the form? ME.Refresh on the final field of the form didn't work. Any other clues??

    I am using Window's XP with Access 2K on it.


    This would be a single form. No sub forms involved. Thank you for the heads up. I tried creating a refresh button but it didn't work the way I would like it to. I will give your idea a shot. I will clue you in to if it worked or not?

    ME.Refresh on the final field of the form didn't work. Any other clues??


    I currently have one Dogs table. Pertenant information is below. As there are more fields, however the important relationship regarding this issue is as below. Dogs table is Set up is as follows:
    DOGID(PK) Dog SireID DamID
    1 Star 2 3
    2 Jake 4 5
    3 Shadow 6 7
    4 Billy 8 9
    5 Mary 10 11
    6 Joe 12 13
    7 Susan 14 15
    etc.

    Currently, putting all the information about Star (the first dog or if I start with a new dog not in the database) Jake and Shadow doesn't show up as the next record until I close the form and reopen it again.
    Thank you for your assistance.

  2. #2
    Join Date
    Sep 2003
    Location
    MI
    Posts
    3,713
    Did you try ReQuery? Me.ReQuery ...

  3. #3
    Join Date
    Oct 2003
    Location
    US
    Posts
    343

    Re: Continual Data Entry

    Use me.Requery

    Me.Refresh only refreshes the screen and completes any pending processes.


    Originally posted by t_galownia
    I am currently working on a database that tracks dog pedigrees (family tree). I have a form that I enter dog (Star), Sire (father)Jake, and Dam (mother)Shadow. When completing the form it stop at the information. Meaning.

    I enter Star's information and when I get to end of form, instead of rolling to next record (Jake) . . . I have to close the form and reopen to get to Jake's and Shadow's (Star's parents) record.

    Is there a way to "refresh" the form and table so I don't have to keep closing and reopening the form? ME.Refresh on the final field of the form didn't work. Any other clues??

    I am using Window's XP with Access 2K on it.


    This would be a single form. No sub forms involved. Thank you for the heads up. I tried creating a refresh button but it didn't work the way I would like it to. I will give your idea a shot. I will clue you in to if it worked or not?

    ME.Refresh on the final field of the form didn't work. Any other clues??


    I currently have one Dogs table. Pertenant information is below. As there are more fields, however the important relationship regarding this issue is as below. Dogs table is Set up is as follows:
    DOGID(PK) Dog SireID DamID
    1 Star 2 3
    2 Jake 4 5
    3 Shadow 6 7
    4 Billy 8 9
    5 Mary 10 11
    6 Joe 12 13
    7 Susan 14 15
    etc.

    Currently, putting all the information about Star (the first dog or if I start with a new dog not in the database) Jake and Shadow doesn't show up as the next record until I close the form and reopen it again.
    Thank you for your assistance.

  4. #4
    Join Date
    Aug 2002
    Posts
    78
    I tried to use ME.Requery on DAMID control, SIRE ID control (After UPdate option) and also on end of last field on form. Still to no avail.
    Sorry I am not sure how I missed that in my post.

  5. #5
    Join Date
    Aug 2002
    Posts
    78
    More information on this issue. This particular form was built on a query. I have tried to build the form on a table yet when trying to enter the SIRE and DAM it will only allow me to use the dogs already in the database. Not sure why the not in list feature works on the query form but not the table form.

  6. #6
    Join Date
    Aug 2002
    Posts
    78
    Below is the code I am using on both the form I created based on the table and the query. The form is not seeing the sire or dam that was just added to the database off of the DogName record.



    Option Compare Database
    Option Explicit

    Private Sub DamID_NotInList(NewData As String, Response As Integer)
    If MsgBox("Are you sure you want to add " & NewData, vbQuestion + vbYesNo) = vbYes Then
    CurrentDb.Execute "INSERT INTO tblDogs (DogName, SexID ) VALUES (" & Chr(34) & NewData & Chr(34) & ", 1)"
    Response = acDataErrAdded
    Else
    Response = acDataErrContinue
    End If
    End Sub

    Private Sub SireID_NotInList(NewData As String, Response As Integer)
    If MsgBox("Are you sure you want to add " & NewData, vbQuestion + vbYesNo) = vbYes Then
    CurrentDb.Execute "INSERT INTO tblDogs (DogName, SexID ) VALUES (" & Chr(34) & NewData & Chr(34) & ", 2)"
    Response = acDataErrAdded
    Else
    Response = acDataErrContinue
    End If
    End Sub

    Rem Sets form to open at a new record
    Private Sub Form_Load()
    DoCmd.GoToRecord , , acNewRec
    End Sub

    Private Sub DogName_AfterUpdate()
    Me.SireID.Requery
    Me.DamID.Requery
    End Sub
    Private Sub SexID_AfterUpdate()
    Me.SireID.Requery
    Me.DamID.Requery
    End Sub

Posting Permissions

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