Welcome to SPN

Register and Join the most happening forum of Sikh community & intellectuals from around the world.

Sign Up Now!

Help Refreshing a Form

Discussion in 'Information Technology' started by Scottie, Nov 19, 2005.

  1. Scottie

    Expand Collapse

    I have a form that I use to input data. I open the form by clicking on
    button on my Switchboard. 5 fields total - 4 drop down boxes and 1
    memo box for comments. I have added a close button to the form.
    Included in the close button are commands to run an append query to a
    linked table on my SQL Server and a delete query to clear the local
    table that is being used to house the data locally on a temporary
    basis. The button works fine the first time that I use it. I input
    the data and then queries run successfully (messages appear asking if I
    want to run the queries.). The form then closes. I reopen the form
    from a button on the switchboard and enter a new data in the fields.
    When I click on the button to close the form, it proceeds to tell me
    that it has 0 records to apppend and consequently 0 records to delete.
    I have attached some code. Can you help?!!!!

    rivate Sub Exit_Click()
    On Error GoTo Err_Exit_Click
    DoCmd.OpenQuery "qryAppendDailyContacts", [acViewNormal], [acReadOnly]

    DoCmd.OpenQuery "qryDeleteDailyContacts", [acViewNormal], [acReadOnly]


    Exit Sub

    MsgBox Err.Description
    Resume Exit_Exit_Click

    End Sub

    Private Sub Form_Load()
    Forms!DailyContacts!Date = ""
    Forms!DailyContacts!PASTeamMember = ""
    Forms!DailyContacts!Contact = ""
    Forms!DailyContacts!Element = ""
    Forms!DailyContacts!Comments = ""

    End Sub
  2. Loading...

    Similar Threads Forum Date
    Interfaith So Help Me O’ God, Yahweh, Allah, Vaheguru, Et. Al…… Interfaith Dialogues Wednesday at 2:03 AM
    Interracial And Interfaith Marriage, Help Needed To Confront/convince My Parents Love & Marriage Aug 16, 2016
    Khalsa Aid Sikh Charity Praised For Helping Stranded UK Travellers Sikh Organisations Jul 26, 2016
    Sikh News Sikh Charity Praised For Helping Stranded UK Travellers - NDTV Breaking News Jul 26, 2016
    HELP ME! Sikh Sikhi Sikhism Mar 19, 2016

Share This Page