Adam Caramon
Registered User
- Local time
- Today, 08:29
- Joined
- Jan 23, 2008
- Messages
- 822
Ok, this is very strange. I have a form with various textboxes and a refresh button. The button calls on_click UpdatePreview. UpdatePreview looks like this:
Now, when I make changes on the live form to textbox1, then click the Update Preview button, the changes are reflected in previewtextbox1. When I make changes in textbox2, then click the Update Preview button, the changes are not reflected in previewtextbox2.
My Form_Current event also runs UpdatePreview. So if I make changes to textbox2, move a record forward, and then move a record back, the changes are reflected. There's nothing else running in Form_Current.
So I assumed that the fact that the record is saving is what is causing this issue, and that seems to pan out. I added a second button (Save record, default button wizard). If I make changes to textbox2, then click the save button, then click the UpdatePreview button, the changes take affect.
What am I missing? Why do the changes for textbox1 automatically update while those for textbox2 require a save?
Thanks in advance.
Code:
if condition 1 = true then
if condition 2 = true then
if condition 3 = true then
if isNull(me.textbox1.value) then
me.previewtextbox1.value = ""
else
me.previewtextbox1.value = me.textbox1.value
end if
if isNull(me.textbox2.value) then
me.previewtextbox2.value = ""
else
me.previewtextbox2.value = me.textbox2.value
end if
end if
end if
end if
Now, when I make changes on the live form to textbox1, then click the Update Preview button, the changes are reflected in previewtextbox1. When I make changes in textbox2, then click the Update Preview button, the changes are not reflected in previewtextbox2.
My Form_Current event also runs UpdatePreview. So if I make changes to textbox2, move a record forward, and then move a record back, the changes are reflected. There's nothing else running in Form_Current.
So I assumed that the fact that the record is saving is what is causing this issue, and that seems to pan out. I added a second button (Save record, default button wizard). If I make changes to textbox2, then click the save button, then click the UpdatePreview button, the changes take affect.
What am I missing? Why do the changes for textbox1 automatically update while those for textbox2 require a save?
Thanks in advance.