immediately changes in the form

benjamin.weizmann

Registered User.
Local time
, 20:07
Joined
Aug 30, 2016
Messages
78
hi :)
I created BeforeUpdate event for "coiltxt" in unbound form (so until user click for saving it, I cant do reqeury):

it checks
Code:
If Not Me.tempcoil.Value = Me.coiltxt.Value Then
and if it exists, it runs all over the other textbox and makes them enabled

but I found the changes do not immediately come into effect, unless type Enter.
which is the most appropriate event to come changes into effect immediately after the condition exists?

thanks
Ben
 
If the form is unbound then the before update event probably isn't fired, as there is no bound recordset record to trigger the event.
 
You can use the OnChange event of coiltxt and its Text property, which reflects the data in the Control before it's saved by exiting it:

Code:
Private Sub coiltxt_Change()
  
  If Not Me.tempcoil.Value = Me.coiltxt.Text Then
   Textbox1.Enabled = True
   Textbox2.Enabled = True
  Else
   Textbox1.Enabled = False
   Textbox2.Enabled = False
  End If

End Sub
Linq ;0)>
 
You can use the OnChange event of coiltxt and its Text property, which reflects the data in the Control before it's saved by exiting it:

Code:
Private Sub coiltxt_Change()
  
  If Not Me.tempcoil.Value = Me.coiltxt.Text Then
   Textbox1.Enabled = True
   Textbox2.Enabled = True
  Else
   Textbox1.Enabled = False
   Textbox2.Enabled = False
  End If

End Sub
Linq ;0)>

thanks my darling :)
it's same affect like when it was as update event
:(
I need to click on any enabled textbox.. and just after it the event occurs
 
Last edited:
if tempcoil is the one you want
to compare:


Private Sub tempcoil_Change()
EnableDisableControls
End Sub

Private Sub tempcoil_Enter()
EnableDisableControls
End Sub

Private Sub EnableDisableControls()
[Textbox1].Enabled = ([tempcoil].Text = [txtcoil] & "")
[textbox2].Enabled = ([tempcoil].Text = [txtcoil] & "")
End Sub
 
take the word "need" in the first quote and replace with "am forced"
sorry about my English

I need it comes changes into effect immediately after the condition exists
and according your solution i'm still forced to click on any enabled textbox.. and just after it the event occurs...
 

Users who are viewing this thread

Back
Top Bottom