• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1351
  • Last Modified:

how to "refresh" a form text box from a query after update.

Access 2003 MDE

Ok I have a form, a command button and a text box and a selection box.

User would select something from the selection box and clicks the command button which saves the selection to a table.
The form preloaded the text box from a query (the query runs calcualtions) and thus when the NEW selection is made the text box that pulls from the query is not updated.
I though me.refresh might refresh the text box (all of them on the screen ) from the query but it doesn't work.

How can I "refresh" (Really only 1 text box... but don't care if all does) a text box that pulls from a query that queries a table that I've updated on the form?


I hope I explained that well enough :>
0
detroitdr
Asked:
detroitdr
  • 4
  • 3
  • 3
2 Solutions
 
DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform)Commented:
Try Me.Recalc

mx
0
 
detroitdrAuthor Commented:
No that didn't work. :<

0
 
Rey Obrero (Capricorn1)Commented:
try
me.requery

what is the record source of the form?

or

me.recordsource=me.recordsource
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
Rey Obrero (Capricorn1)Commented:
or

me.txtboxName.requery
0
 
DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform)Commented:
Maybe

Me.ThatTextBox.ControlSource = "<TheNameOfTheFieldForThatTextBox>"

w/o the <> 

mx
0
 
detroitdrAuthor Commented:
ok I guess it helps if i was to have said the text box is unbound..... so i can do it by opening a record set and repulling info right after and update... is that how you would do it?

(Being that it is unbound.. refresh/recalc/requery.. wouldn't have an effect right?)
0
 
Rey Obrero (Capricorn1)Commented:

you can use dlookup("FieldFromTable","nameOfTable", "Criteria=<someValue>")

0
 
Rey Obrero (Capricorn1)Commented:
or

dlookup("FieldFromquery","nameOfquery", "Criteria=<someValue>")
0
 
detroitdrAuthor Commented:
second part of my question was:
(Being that it is unbound.. refresh/recalc/requery.. wouldn't have an effect right?)
0
 
DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform)Commented:
oops ... right!
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 4
  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now