Welcome to SPN

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

Sign Up Now!
  1.   Become a Supporter    ::   Make a Contribution   
    Target (Recurring Monthly): $200 :: Achieved: $98

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...

Since you're here... we have a small favor to ask...

More people are visiting & reading SPN than ever but far fewer are paying to sustain it. Advertising revenues across the online media have fallen fast. So you can see why we need to ask for your help. Donating to SPN's is vote for free speech, for diversity of opinions, for the right of the people to stand up to religious bigotry. Without any affiliation to any organization, this constant struggle takes a lot of hard work to sustain as we entirely depend on the contributions of our esteemed writers/readers. We do it because we believe our perspective matters – because it might well be your perspective, too... Fund our efforts and together we can keep the world informed about the real Sikh Sikhi Sikhism. If everyone who writes or reads our content, who likes it, helps us to pay for it, our future would be much more secure. Every Contribution Matters, Contribute Generously!

    Become a Supporter      ::     Make a Contribution     

Share This Page