Fields not updating until I close and reopen

G

Guest

Hi I am new to Access and I have this problem that occurs when the user
enters/updates a form that updates another form.

I open a form frmAttendance (the fields in question are text fields and are
unbound) there is nothing in the fields. Then I click on a Travel form
button (it brings up the Travel form - frmTravel) there are fields on the
Travel form that when it is closed, I want those fields to display on the
frmAttendance (form). They only display when I close the frmAttendance and
reopen. Lets just use one field to simplfy:

I put this in the control source of that field on frmAttendance:

=DLookUp("[Airfare]","qryTravel","[SSN] = '" & [SSN] & "'")

I put this expression in the close of frmTravel (TxtAir is text box name):

TxtAir = Forms!frmTravel!Airfare

still I have to close frmAttendance and reopen for it to display with
changed/added updates.


Please help and Thank you for any response
 
A

Arvin Meyer [MVP]

In frmTravel's Close event, add an Event Procedure with this line of code:

Forms!frmAttendance.Requery
 
G

Guest

Thank You very much that part now works fine....

Arvin Meyer said:
In frmTravel's Close event, add an Event Procedure with this line of code:

Forms!frmAttendance.Requery
--
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.mvps.org/access
http://www.accessmvp.com

Amour said:
Hi I am new to Access and I have this problem that occurs when the user
enters/updates a form that updates another form.

I open a form frmAttendance (the fields in question are text fields and
are
unbound) there is nothing in the fields. Then I click on a Travel form
button (it brings up the Travel form - frmTravel) there are fields on the
Travel form that when it is closed, I want those fields to display on the
frmAttendance (form). They only display when I close the frmAttendance
and
reopen. Lets just use one field to simplfy:

I put this in the control source of that field on frmAttendance:

=DLookUp("[Airfare]","qryTravel","[SSN] = '" & [SSN] & "'")

I put this expression in the close of frmTravel (TxtAir is text box name):

TxtAir = Forms!frmTravel!Airfare

still I have to close frmAttendance and reopen for it to display with
changed/added updates.


Please help and Thank you for any response
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top