Refresh Bug

StefanSch

Registered User.
Local time
Tomorrow, 00:11
Joined
Jan 18, 2003
Messages
136
The problem is the following:

I have a subform. The subform includes 5 fields (text boxes). After an input in a field, I refresh the subform with the following code:

Forms![frmArticle]![sbfrmDetails].Form.Refresh

Strange enough that after the refresh the cursor goes back to the first field of the current record. Why is that? Can I avoid that?
 
Actually, I refresh another subform which needs to be updated.

I refresh this subform because I need to compare the textbox A in subform A with the textbox B in subform B. I need to have the refreshing effect.

Any ideas?
 
No you don't, you need to save the record
Which subform is the Refresh used on?
 
The refresh command is used on subform A.

How can I use the save method instead of the refresh-Method so that the text box B in subform B changes immediately its calculated value after the data in text box A in subform A is entered?
 
You need to Refresh/Requery subFormB after saving the changes to A
 
I agree

But how do I get the cursor actually staying in the original field even if I refresh form B?

And how do I make sure that the subform A does not move after the refresh (there is plenty of space below). The subform A actually moves in a way so that the record in which the cursor is currently staying is the first visible record in the subform? This can afterwards be manually changed by pressing twice "pgup" which I however don't intend to do all the time.

any ideas?

Thanks.
 
Could you perhaps store the field name in a variable?

TextField1 OnExit()
strFName = Me.Textfield1.Name

~ Refresh Page ~

strFName.SetFocus

I have no idea if this would work, or if the syntax is correct, but the method seems like it would work?
 
Custom solution for this common problem

This did not work unfortunately, the cursor stays in the first record.

I guess that this problem is quite common. There must be an easy solution for that.
 

Users who are viewing this thread

Back
Top Bottom