Results 1 to 4 of 4
  1. #1
    Join Date
    Jan 2004
    Posts
    44

    Unanswered: Confused on Update Procedures

    I'm a little confused on how Access goes about handling update procedures.
    What I'm working with (somebody else is working on this db), is a form that allows you to cycle through each of the selections by using the small arrow keys at the bottom of the form. Once you are on the selection that you want, you then click a button and you are taken to a form that pops up with more detailed information for the specific selection. It looks like the information is still coming from the same table that the main form is drawing it's information from...
    When in the new form there arrows are still at the bottom and you can cycle through. However, there is nothing really there to cycle through. When you hit over, everything turns to zeros.
    Now, the object here is when on the second form to hit a button and have a report come up. However, if information is changed on the form and the report button is hit the report comes up with the old infroation. However, if I pan over with the arrows to the "next" page that contains zeros and then back again, and [i]then[\i] hit report, the report that now appears contains the altered numbers from the form.
    Why is this so? What do I need to do so that I do not have to page over and back?

    I have some more questions that stem from this, but perhaps answers to this will clear some matters up.
    Thanks in advance!

    [edit] - Also, if the above is confusing or needs clarifying please say so.
    Last edited by Superman07; 02-04-04 at 13:49.

  2. #2
    Join Date
    Jan 2004
    Posts
    44
    Looking through some of the help files I'm wondering if I just need to run an update query?

    However, I suppose I would query the form and have it update the table? Or is the table really being updated when I enter new numbers into the form, in which case I don't need to update anything?

  3. #3
    Join Date
    Oct 2003
    Location
    Roanoke, Va
    Posts
    445

    Smile Re: Confused on Update Procedures

    Originally posted by Superman07
    I'm a little confused on how Access goes about handling update procedures.
    What I'm working with (somebody else is working on this db), is a form that allows you to cycle through each of the selections by using the small arrow keys at the bottom of the form. Once you are on the selection that you want, you then click a button and you are taken to a form that pops up with more detailed information for the specific selection. It looks like the information is still coming from the same table that the main form is drawing it's information from...
    When in the new form there arrows are still at the bottom and you can cycle through. However, there is nothing really there to cycle through. When you hit over, everything turns to zeros.
    Now, the object here is when on the second form to hit a button and have a report come up. However, if information is changed on the form and the report button is hit the report comes up with the old infroation. However, if I pan over with the arrows to the "next" page that contains zeros and then back again, and [i]then[\i] hit report, the report that now appears contains the altered numbers from the form.
    Why is this so? What do I need to do so that I do not have to page over and back?

    I have some more questions that stem from this, but perhaps answers to this will clear some matters up.
    Thanks in advance!

    [edit] - Also, if the above is confusing or needs clarifying please say so.

    I hope that you don't think that this a cheezy way of suggesting a solution, but you might find what you are looking for in this help topic. This is the whole screen that was displayed for the Refresh method. Sometimes you need to requery the data source and sometimes you need to refresh.

    Refresh Method
    See Also Applies To Example Specifics
    The Refresh method immediately updates the records in the underlying record source for a specified form or datasheet to reflect changes made to the data by you and other users in a multiuser environment.

    expression.Refresh

    expression Required. An expression that returns one of the objects in the Applies To list.

    Remarks
    Using the Refresh method is equivalent to clicking Refresh on the Records menu.

    Microsoft Access refreshes records automatically, based on the Refresh Interval setting on the Advanced tab of the Options dialog box, available by clicking Options on the Tools menu. ODBC data sources are refreshed based on the ODBC Refresh Interval setting on the Advanced tab of the Options dialog box. You can use the Refresh method to view changes that have been made to the current set of records in a form or datasheet since the record source underlying the form or datasheet was last refreshed.

    The Refresh method shows only changes made to records in the current set. Since the Refresh method doesn't actually requery the database, the current set won't include records that have been added or exclude records that have been deleted since the database was last requeried. Nor will it exclude records that no longer satisfy the criteria of the query or filter. To requery the database, use the Requery method. When the record source for a form is requeried, the current set of records will accurately reflect all data in the record source.

    Notes

    It's often faster to refresh a form or datasheet than to requery it. This is especially true if the initial query was slow to run.
    Don't confuse the Refresh method with the Repaint method, which repaints the screen with any pending visual changes.
    Example
    The following example uses the Refresh method to update the records in the underlying record source for the form Customers whenever the form receives the focus:

    Private Sub Form_Activate()
    Me.Refresh
    End Sub

    Hope this helps.

    Gregg

  4. #4
    Join Date
    Jan 2004
    Posts
    44
    It might. I'll give it a try and see how it works out. Thanks for the reply!

Posting Permissions

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