Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SetValue Macro Affects All Records on SubForm. Help!

Status
Not open for further replies.

Sarahz

Technical User
Jun 26, 2002
10
US
Hello! I'm new to macros and I'm having an issue with SetValue and subforms (I'm pulling my hair out on this one). I created a SetValue macro to set the Enable property to 0 (disabled) for a group of fields on a subform when the dept field equals "400".

It worked great until I set the default view for my subform to Continuous Forms. Now, every time I change the dept field to 400 for a particular record, every field in that group is disabled on all records displayed on the subform (even for those where the dept field is not 400.)

Here's what I have for one of the fields in the macro:
Code:
Condition: [Forms]![frmEnterDataMain]![frmEnterData].[Form]![dept]=400 
Item: [Forms]![frmEnterDataMain]![frmEnterData].[Form]![total_hrs].[Enabled]
Expression: 0
How can I change it so that only fields are disabled on a certain record? Thanks so much in advance!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top