Making Text field active

Tansar

Registered User.
Local time
Today, 02:04
Joined
Dec 28, 2000
Messages
55
Hi,
Is it possible to make a text box field active based on content from another box?

Basically I have a drop dwon combo box that shows a list, such as 'active, withheld, archived, etc'. If the used selects archived, then I'd like the the textbox to be active so the user can input a date that it was archived.

Hope that makes sense :confused:

TIA :)
 
sure in the after update event of the combo you can check to see if its value is whatever you want then base that on if you make your textbox active or not.

so
Code:
if me.combo = "whatever" <- you could also base this on the index or whatever value your combo is based on
then
me.yourtextboxname.active="true"
else
'do nothing
end if
 
in the after update event field of combo write the code below

if me.combo(your combo Name Here) = "Archived" then
textbox1(your Text box Name Here).enabled=true
else
textbox1(your Text box Name Here).enabled=false
endif
 
Thank you for the prompt response...:)

My combo box is called: St_Status
My text box is called: archive - which is unbound.

Do I use the 'Expression builder' to write that code. :o

This is all new to me :(

Thanks again.
 
Is the following correct?

Private Sub ST_Status_AfterUpdate()
If Me.combo(ST_Status) = "Archived" Then
archive(archive).Enabled = True
Else
archive(archive).Enabled = False
End If

End Sub
 
Private Sub ST_Status_AfterUpdate()
If Me.ST_Status = "Archived" Then
me.archive.Enabled = True
Else
me.archive.Enabled = False
End If

End Sub
 

Users who are viewing this thread

Back
Top Bottom