After Update Event Issue

G

Guest

I've got a subform (sfrmRevenue) that contains a combo box called TranType.
In the After Update event of this combo box, I've got this code...

If Me!TranType.Column(0) = 1 Then
Me.Rate.Enabled = True
Me.Members.Enabled = True
End If

The code works fine, but what I really want is to enable the Rate and
Members controls in the current record only - the code currently enables the
Rate and Members controls for ALL records. The subform is displayed in
datasheet mode. Saying it another way, I only want to enable Rate and
Members for the record that currently has the focus. Is this do-able?
 
S

strive4peace

on the form OnCurrent event:

me.someother_controlname.setfocus
Me.Rate.Enabled = false
Me.Members.Enabled = false


Warm Regards,
Crystal
Microsoft Access MVP 2006

*
Have an awesome day ;)

remote programming and training
strive4peace2006 at yahoo.com

*
 
S

Steve Schapel

Kirk,

Assuming you are referring to a continuous view subform, you can't do
this in code for just one record.

However, you can do it by using Conditional Formatting, applied to the
Rate and Members controls. Please post back if you need more specific
help with this aspect.
 

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