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

TextBox refresh only, or refresh current record

how to refresh a text box onLoad(), without using me.refresh or me.requery or me.recalc because they refresh the whole form and takes me to first record!!!  i tried several onCurrent events and so
0
ahashash
Asked:
ahashash
  • 2
  • 2
  • 2
1 Solution
 
DatabaseMX (Joe Anderson - Microsoft Access MVP)Database ArchitectCommented:
What is in the text box that you needs to refresh?
0
 
ahashashAuthor Commented:
some have integer values that are results of some datdiff functions, and some have strings, i would like to have the text box be updated onChange of these values AND  follows the current record, its like i move to the next record and the value is still the same so i had to make a button and press it in order to update that textbox, the best solution is to update the current record but using me.recalc and these things jumps the form to the first record!!!??
0
 
Jeffrey CoachmanMIS LiasonCommented:
Can you first take a step back and explan exactly what you have here?
Perhaps there is an alternative solution or design.

For example, if your concern is returning to "the record" (After a Requery) , then this is simple to do:

' Return to the record

'Declare the variables
Dim rs As Object
Dim lngID As Long
    'set (save) the ID field to the ID of the current record
    lngID = Me.ID
    Set rs = Me.Recordset.Clone
   
    'Requery
    Me.Requery
   
    'Move back to the record
    rs.FindFirst "[ID] = " & Str(Nz(lngID, 0))
    If Not rs.EOF Then Me.Bookmark = rs.Bookmark


JeffCoachman

0
Cloud Class® Course: CompTIA Healthcare IT Tech

This course will help prep you to earn the CompTIA Healthcare IT Technician certification showing that you have the knowledge and skills needed to succeed in installing, managing, and troubleshooting IT systems in medical and clinical settings.

 
DatabaseMX (Joe Anderson - Microsoft Access MVP)Database ArchitectCommented:
Are these calculated values ... in the text box(s) ?

=<SomeExpression>

?

mx
0
 
ahashashAuthor Commented:
Thanks
0
 
Jeffrey CoachmanMIS LiasonCommented:
ok
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

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