Drop down Disable question - EASY QUESTION

azwildcat4ever

Registered User.
Local time
Yesterday, 21:09
Joined
Oct 6, 2004
Messages
13
I have a drop down menu on a form. When it has been updated to a certain value I want some of the field on my form to be disabled.

I am thinking it is a afterUpdate event, What would be the code to disable another field on the form

would it be something like this

If Forms![frmPlacements]![CostType] = "consultant" Then Forms![frmPlacements]![Wages].Disabled


CostType is a drop down menu with entry as follow: consultant, permananent, none and when consultant is selected the Wages text box should be disabled

Thanks
 
Wrong syntax ("disabled"). Try:

Me.Wages.Enabled = False
 
what do u mean by that..what does 'me" do

this is how the form looks like

i want to disabled Wages if cost type id filed is 4
 

Attachments

  • cts123.GIF
    cts123.GIF
    69.6 KB · Views: 149
Me refers to the object the code is in. Presuming this code is in the form named frmPlacements, Me refers to that form. Therefore, instead of having to type "Forms!frmPlacements" you can just type "Me". In the update event of cost type id:

Code:
If Me.[cost type id] = 4 Then
  Me.Wages.Enabled = False
End If
 
i am not sure how to disable a field which is this case is WAges. What data am i checking for. The text insde teh pulldown menu or the actual data being pulled from the cost type table.

?what should be validatiing Cost Type field . Cost type id is pulling cost type for tblCostType. So essentially what should i use when disabling the Wages field?

Pleae look at the screen shot,,thanks much
 

Attachments

  • ctsimage.GIF
    ctsimage.GIF
    12.5 KB · Views: 150
Sure, post a sample db. I think I've already given you the answer, so maybe we have a misunderstanding that a sample will clear up.
 

Users who are viewing this thread

Back
Top Bottom