Event on 'unbound' textbox

Safari

Member
Local time
Today, 03:48
Joined
Jun 14, 2021
Messages
95

Hi All

I want to use temporary nemric value in unbound textbox, but i cant seem to run any code on an unbound textbox.
Like :

If nemric value is greater than 1
Make X textbox is enabled

I tried to make it with many events like after update but nothing happened.

Can anyone help me

Thanks in advance
 
Works for me. Provide your code. Or provide the database - follow instructions at bottom of my post.
 
Works for me. Provide your code. Or provide the database - follow instructions at bottom of my post.
Code is

If me.unbound textbox.value > 1 then
me.x.enabled=true
End if
 
Textbox name is actually "unboundtextbox"?

Conditional Formatting would be better approach than VBA.
 
have you really called your textbox 'unboundtextbox' and another x?

a shorter version (for your unboundtextbox afterupdate event)
me.x.enabled=me.unboundtextbox>1

or use conditional formatting if x can be conditionally formatted
 
How can I do it with conditional format
have you really called your textbox 'unboundtextbox' and another x?

a shorter version (for your unboundtextbox afterupdate event)
me.x.enabled=me.unboundtextbox>1

or use conditional formatting if x can be conditionally formatted
 
The problem with unbound controls is that a lot of the events relate to updating the underlying record - and that can't happen for unbound controls. You can do things with GotFocus and LostFocus even for unbound controls. You can also use Enter and Exit events for controls. However, some events can be defined but unreachable if they depend on an actual update event (where the underlying record takes on the value from the control.)
 
The problem with unbound controls is that a lot of the events relate to updating the underlying record - and that can't happen for unbound controls. You can do things with GotFocus and LostFocus even for unbound controls. You can also use Enter and Exit events for controls. However, some events can be defined but unreachable if they depend on an actual update event (where the underlying record takes on the value from the control.)
Well done
 
AfterUpdate event with unbound control worked for me whether on bound or unbound form.
 
my assumption is that it is x that needs to disabled and is bound. But the OP is not being very forthcoming about the detail.

to determine if x can be conditionally formatted, see the format ribbon when the form is in edit mode and x has been selected
 
@Safari Please don't start multiple threads on the same topic. If you find a thread has a dead end so you want to change the question, at least provide a link in the new thread. Apparently I just wasted my time answering this question in a different thread.
 

Users who are viewing this thread

Back
Top Bottom