Simple One Line Code Question!!!

K

kennykee

I am new in vba

What is the code to disable a text box in form? (Assume [TextBox] is the
text box)

Thanks in advance

Kennykee
 
N

Nikos Yannacopoulos

Me.Textbox.Enabled = False

in the form's own module, or:

Forms![Formname].TextBox.Enabled = False

in another module.

HTH,
Nikos
 
D

David C. Holley

N -

You left out mentioning that a trip to a good Irish Pub or an even
better Taverna is always a good idea.

Nikos said:
Me.Textbox.Enabled = False

in the form's own module, or:

Forms![Formname].TextBox.Enabled = False

in another module.

HTH,
Nikos
I am new in vba

What is the code to disable a text box in form? (Assume [TextBox] is
the text box)

Thanks in advance

Kennykee
 
N

Nikos Yannacopoulos

David said:
N -

You left out mentioning that a trip to a good Irish Pub or an even
better Taverna is always a good idea.
No reason to repeat the obvious!
 
D

David C. Holley

Just trying to educate the idiot non-Greeks. Although I realize that its
mostly pointless.
:)
 
K

kennykee

Thanks

But how to disable only for one record but not for the whole field?

Thanks

KennyKee

David C. Holley said:
Me![controlName].enabled = False
I am new in vba

What is the code to disable a text box in form? (Assume [TextBox] is the
text box)

Thanks in advance

Kennykee
 
K

Klatuu

Obviously you have been to the pub. :)
A field is part of a record, not the otherway round.
What are you really trying to do?

kennykee said:
Thanks

But how to disable only for one record but not for the whole field?

Thanks

KennyKee

David C. Holley said:
Me![controlName].enabled = False
I am new in vba

What is the code to disable a text box in form? (Assume [TextBox] is the
text box)

Thanks in advance

Kennykee
 
K

kennykee

lol.....
I dont drink
Forget about the question

Thanks anyway

Klatuu said:
Obviously you have been to the pub. :)
A field is part of a record, not the otherway round.
What are you really trying to do?

kennykee said:
Thanks

But how to disable only for one record but not for the whole field?

Thanks

KennyKee

David C. Holley said:
Me![controlName].enabled = False

kennykee wrote:
I am new in vba

What is the code to disable a text box in form? (Assume [TextBox] is the
text box)

Thanks in advance

Kennykee
 
D

David C. Holley

To disable on a record-by-record basis, you'll want to use conditional
formating. Right click on the field and you should see it there in the
options.
Thanks

But how to disable only for one record but not for the whole field?

Thanks

KennyKee

:

Me![controlName].enabled = False
I am new in vba

What is the code to disable a text box in form? (Assume [TextBox] is the
text box)

Thanks in advance

Kennykee
 
K

kennykee

Thanks David
You solve the puzzle
Thanks a lot.




David C. Holley said:
To disable on a record-by-record basis, you'll want to use conditional
formating. Right click on the field and you should see it there in the
options.
Thanks

But how to disable only for one record but not for the whole field?

Thanks

KennyKee

:

Me![controlName].enabled = False

kennykee wrote:

I am new in vba

What is the code to disable a text box in form? (Assume [TextBox] is the
text box)

Thanks in advance

Kennykee
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top