Refresh form data.

  • Thread starter Thread starter Antonio
  • Start date Start date
A

Antonio

I have a form containing two seperate subforms located on
two different "tab"s. I used the "Tab Control" function
on the form tool box to place the the "tabs" on my form.
The first "page" of the tab control has a form used to
enter ones daily productivity. The other "page" contains
a subform that displays the previous productivity entries
in Data Sheet form. Is there a way for the form to
automatically refresh/repost the form data so that after
the user enters the last piece of data into the form (The
productivity form is set up for Data Entry and the data
sheet on the second tab is set up as read only)the sub
datasheet automatically refreshes and displays the data
the user just entered? As of now, the user has to close
the form and re open it inorder to see their recent data
entries. I tried to place a "refresh" button onto the
second page (containing the data sheet) but when I
clicked on it I got an error message stating the "refresh
application was not available". Any help would be
appreciated.
thanks.
 
Hi Antonio,

try using this to code to requery the 2nd subform when you click on the tab control to change to page 2:

Private Sub YourTabControl_Change()
If Me.YourTabControl.Pages(Me.YourTabControl).Name = "Your 2nd Page Name" Then
Me.Your2ndSubform.Requery
End If
End Sub

Change the code to match your control name (look at each control property).

Hope this help. Let me know.





----- Antonio wrote: -----

I have a form containing two seperate subforms located on
two different "tab"s. I used the "Tab Control" function
on the form tool box to place the the "tabs" on my form.
The first "page" of the tab control has a form used to
enter ones daily productivity. The other "page" contains
a subform that displays the previous productivity entries
in Data Sheet form. Is there a way for the form to
automatically refresh/repost the form data so that after
the user enters the last piece of data into the form (The
productivity form is set up for Data Entry and the data
sheet on the second tab is set up as read only)the sub
datasheet automatically refreshes and displays the data
the user just entered? As of now, the user has to close
the form and re open it inorder to see their recent data
entries. I tried to place a "refresh" button onto the
second page (containing the data sheet) but when I
clicked on it I got an error message stating the "refresh
application was not available". Any help would be
appreciated.
thanks.
 
Back
Top