By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
444,124 Members | 2,054 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 444,124 IT Pros & Developers. It's quick & easy.

Force a table to update

P: n/a
I am using the following code to display the total of the amount field in
the Position table.

Private Sub txtTotal_Click()
Dim curX As Long
curX = DSum("[amount]", "position")
txtTotal.Text = CStr(curX)
End Sub

The txtTotal.Text is computed and displayed okay.
However when I update the amount field on the screen the new value for
txtTotal.Text doesn't change unless I close the Access Database and reopen
it.
Can I force the updated value of the amount field to to be saved in the
position table without actually closing the database?

Dec 6 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a
The value has changed, but the display has not. You need to requery the
control. see Help

Control.requery

"RICHARD BROMBERG" <no*****@att.netwrote in message
news:Ub********************@bgtnsc05-news.ops.worldnet.att.net...
>I am using the following code to display the total of the amount field in
the Position table.

Private Sub txtTotal_Click()
Dim curX As Long
curX = DSum("[amount]", "position")
txtTotal.Text = CStr(curX)
End Sub

The txtTotal.Text is computed and displayed okay.
However when I update the amount field on the screen the new value for
txtTotal.Text doesn't change unless I close the Access Database and reopen
it.
Can I force the updated value of the amount field to to be saved in the
position table without actually closing the database?


Dec 6 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.