Updaing list of names on the subform 
July 6th, 2009, 03:32 PM
| | Newbie | | Join Date: Jul 2009
Posts: 13
| | |
I have a form called NewPatient for new patients entry. What i want is that, i need to update or completely refresh the MainForm and it will automatically display in subform1 for the list of patients currently admitted.
I try the requery and refresh upon MainForm_Active() but nothing happen. all i will do is that to press the F5 in order to refresh it completely.
-Thanks for helping-
| 
July 6th, 2009, 04:29 PM
|  | Newbie | | Join Date: Jul 2009
Posts: 7
| | | re: Updaing list of names on the subform
Simple Form.Requery does the thing - at least in Access 2007. Remark: You don't need to substitute something instead of "Form", write it as is. | 
July 6th, 2009, 04:31 PM
| | Newbie | | Join Date: Jul 2009
Posts: 13
| | | re: Updaing list of names on the subform
yea i did that but nothing happened. im using ms 2007 too.
| 
July 6th, 2009, 04:45 PM
|  | Newbie | | Join Date: Jul 2009
Posts: 7
| | | re: Updaing list of names on the subform
There can be the problem because of entering new record, which can be not inserted to database in fact.
Try testing it on some existing record, not on creating a new one.
| 
July 6th, 2009, 05:17 PM
| | Newbie | | Join Date: Jul 2009
Posts: 13
| | | re: Updaing list of names on the subform
Its not working still i dont know why.
| 
July 6th, 2009, 05:23 PM
|  | Newbie | | Join Date: Jul 2009
Posts: 7
| | | re: Updaing list of names on the subform
Can you share and MDB to take a look?
| 
July 6th, 2009, 06:17 PM
|  | Expert | | Join Date: Jan 2008 Location: witness protection
Posts: 610
Provided Answers: 2 | | | re: Updaing list of names on the subform
I don't have enough info but I do not think that putting it in the Activate event will do what you want. You will need to put it somewhere else.
cheers,
| 
July 6th, 2009, 11:42 PM
| | Newbie | | Join Date: Jul 2009
Posts: 13
| | | re: Updaing list of names on the subform Quote:
Originally Posted by mshmyob I don't have enough info but I do not think that putting it in the Activate event will do what you want. You will need to put it somewhere else.
cheers, | But how would i do it?
| 
July 7th, 2009, 01:28 AM
|  | Expert | | Join Date: Jan 2008 Location: witness protection
Posts: 610
Provided Answers: 2 | | | re: Updaing list of names on the subform
Again without more details from you, most often this type of thing would be done in the AfterUpdate event of the form or a control or in the AfterInsert event.
cheers, Quote:
Originally Posted by mjworks2009 But how would i do it? | | 
July 7th, 2009, 09:14 AM
| | Newbie | | Join Date: Jul 2009
Posts: 13
| | | re: Updaing list of names on the subform
I figure it out how to. i used the timer event
Private Sub Form_Timer()
If Me.Timer = 0 Then
Me.subform1.Requery
Else
Me.Timer = Me.Timer - 1
End If
End Sub
in this way the subform1 will refresh every second.
Thanks alot for the reply.
|  | | | | /bytes/about
We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights.
Get the best answers to your questions from over 225,702 network members.
|