C
calum112
I'm 'rather' stuck I've had some help to get it working so far but I'm
totally stuck on this:
Each of my records in a form has a cmd button 'expand' next to it, when
pressed, the subform for that record is displayed in a new form. The subform
is matched to the record using field 2 and 3.
Now, how do I make it so that when the page loads up it checks each record in
the form to see if it has a subform (based upon the above fields) and if not
then it hides the button 'expand' for that record.
I've got this so far:
If Not IsNull(DLookup("[Field 2] = '" & Me.[Field 2] & "' And [Field 3] = " &
Me.[Field 3])) Then
Forms![Sub Categories - Do everything]![Expand].Visible = False
Else
Forms![Sub Categories - Do everything]![Expand].Visible = True
End If
And I've tried putting it in the 'On Current' (code builder) part of the form,
however it just tells me the first line (sub expand) is not optional???
Majorly stuck so a way out is much much appreciated, I dont' want to lose my
hair so quickly
Cheers
totally stuck on this:
Each of my records in a form has a cmd button 'expand' next to it, when
pressed, the subform for that record is displayed in a new form. The subform
is matched to the record using field 2 and 3.
Now, how do I make it so that when the page loads up it checks each record in
the form to see if it has a subform (based upon the above fields) and if not
then it hides the button 'expand' for that record.
I've got this so far:
If Not IsNull(DLookup("[Field 2] = '" & Me.[Field 2] & "' And [Field 3] = " &
Me.[Field 3])) Then
Forms![Sub Categories - Do everything]![Expand].Visible = False
Else
Forms![Sub Categories - Do everything]![Expand].Visible = True
End If
And I've tried putting it in the 'On Current' (code builder) part of the form,
however it just tells me the first line (sub expand) is not optional???
Majorly stuck so a way out is much much appreciated, I dont' want to lose my
hair so quickly
Cheers