Senin, 25 Maret 2013

RE: [MS_AccessPros] How to refresh data

 

Ray-

Just Requery the subforms to stay on the same record.

John Viescas, Author

Microsoft Access 2010 Inside Out

Microsoft Access 2007 Inside Out

Microsoft Access 2003 Inside Out

Building Microsoft Access Applications

SQL Queries for Mere Mortals

http://www.viescas.com/

(Paris, France)

From: MS_Access_Professionals@yahoogroups.com
[mailto:MS_Access_Professionals@yahoogroups.com] On Behalf Of Ray
Sent: Monday, March 25, 2013 9:03 PM
To: MS_Access_Professionals@yahoogroups.com
Subject: Re: [MS_AccessPros] How to refresh data

Hi John

Thanks for the nudge in the right direction.

When I did a Requery on the Master form it correctly "refreshed" the data on
all the child forms. The master form then displayed the first record in the
set again, rather than the record I was looking at but I'll experiment to
solve that one.

Thanks again
Ray

--- In MS_Access_Professionals@yahoogroups.com
<mailto:MS_Access_Professionals%40yahoogroups.com> , John Viescas
<JohnV@...> wrote:
>
> Ray-
>
>
>
> DoCmd.Requery does a Requery of the entire form - and that should do the
> trick. The alternative is to use the Requery method and target each
> specific subform:
>
>
>
> Me.fsubStudents.Requery
>
> Me.fsubStudentExams.Requery
>
>
>
> .. or something like that.
>
>
>
>
>
> John Viescas, Author
>
> Microsoft Access 2010 Inside Out
>
> Microsoft Access 2007 Inside Out
>
> Microsoft Access 2003 Inside Out
>
> Building Microsoft Access Applications
>
> SQL Queries for Mere Mortals
>
> http://www.viescas.com/
>
> (Paris, France)
>
>
>
>
>
>
>
> From: MS_Access_Professionals@yahoogroups.com
<mailto:MS_Access_Professionals%40yahoogroups.com>
> [mailto:MS_Access_Professionals@yahoogroups.com
<mailto:MS_Access_Professionals%40yahoogroups.com> ] On Behalf Of Ray
> Sent: Sunday, March 24, 2013 5:49 PM
> To: MS_Access_Professionals@yahoogroups.com
<mailto:MS_Access_Professionals%40yahoogroups.com>
> Subject: [MS_AccessPros] How to refresh data
>
>
>
>
>
> I have database that holds training courses, students and allocations on a
> course. The main form shows the course details. The lower half of the main
> form has a few pages, each with an embedded subform showing the students
who
> are on the course. The first page shows the students on the course (i.e.
> name, company, email etc on a continuous form). The next page shows the
> student name, exam results etc (again continuous form).
>
> I have placed a command button on the first page, embedded in the
continuous
> form, to allow the student to be moved to another course. This opens
another
> form in dialog mode which allows the new course to be selected, runs some
> SQL to update the allocations table and return to the original form. The
vba
> code is
> stDocName = "frmMoveDelegate"
> DoCmd.OpenForm stDocName, , , stLinkCriteria, , acDialog
> DoCmd.Requery
>
> The requery does remove the student from the first page - showing the user
> that they have been successful. However, if you click on the second page
the
> "moved" student is still there, like an after image. How can I refresh the
> data on all the pages associated with the course? It's probably a simple
> solution but I'm a bit stumpted at present and would appreciate some help.
>
> Many thanks
> Ray
>
>
>
>
>
> [Non-text portions of this message have been removed]
>

[Non-text portions of this message have been removed]

__._,_.___
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (4)
Recent Activity:
.

__,_._,___

Tidak ada komentar:

Posting Komentar