Can Anyone Help Me?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I sent this question in yesturday but no one responded. If it's not
something that can be done, can someone at least tell me that, please?

I have a subform named Silvsub that is based on my S table and it displays in
datasheet view. I have 2 text fields (Category and Activity) that have pull
down menus based on respectively named tables. When the text “Stand Exam†is
chosen from the Activity field menu I would like the Category field to auto
fill with the menu text “None†and I would like the Comments field to get the
focus. How can I code this?
 
Use the AfterUpdate event of the Category combo box to run this code (change
the names as needed):

Private Sub Category_AfterUpdate()
If Me.Category.Value = "Stand Exam" Then
Me.Activity.Value = "None"
Me.Comments.SetFocus
End If
End Sub
 
Thanks Ken, it works great!
--
Lorraine


Ken Snell said:
Use the AfterUpdate event of the Category combo box to run this code (change
the names as needed):

Private Sub Category_AfterUpdate()
If Me.Category.Value = "Stand Exam" Then
Me.Activity.Value = "None"
Me.Comments.SetFocus
End If
End Sub
 
Back
Top