Menubars, Allowedits, and Subforms

  • Thread starter Thread starter J.
  • Start date Start date
J

J.

Hello all,

I have a app that has a custom menubar, a main form with a subform
embedded. It's the subform that contains the information I am most
concerned with. I've got an "Edit Record" button on my menubar that I
want to use with my subform. By default, the subform has the AllowEdits
= False so my users cannot change information. Since I am using a
menubar and haven't been able to call subroutines, I've placed a
function in a module to do my dirty work. I'm having trouble with it
and maybe it's just a deal with exact refering, but, I haven't been able
to set the allowEdits = True on the subform, just the mainform.

I've tried:

Me.AllowEdits = True

Screen.ActiveForm.AllowEdits = True

Forms("mainForm").Subform.AllowEdits = True

Can someone point me in the right direction?

Thanks.

J.
 
You might try the followwing. Just substitute the name of
the subform for "SubformName"

Forms![MainForm]![SubformName].Form.AllowEdits = True

Hope this helps.

Byron
 
Byron, I tried what you wrote...that didn't do it


You might try the followwing. Just substitute the name of
the subform for "SubformName"

Forms![MainForm]![SubformName].Form.AllowEdits = True

Hope this helps.

Byron

-----Original Message-----
Hello all,

I have a app that has a custom menubar, a main form with

a subform
embedded. It's the subform that contains the

information I am most
concerned with. I've got an "Edit Record" button on my

menubar that I
want to use with my subform. By default, the subform

has the AllowEdits
= False so my users cannot change information. Since

I am using a
menubar and haven't been able to call subroutines, I've

placed a
function in a module to do my dirty work. I'm having

trouble with it
and maybe it's just a deal with exact refering, but, I

haven't been able
to set the allowEdits = True on the subform, just the
mainform.

I've tried:

Me.AllowEdits = True

Screen.ActiveForm.AllowEdits = True

Forms("mainForm").Subform.AllowEdits = True

Can someone point me in the right direction?

Thanks.

J.
.
 
Brian said:
Byron, I tried what you wrote...that didn't do it


You might try the followwing. Just substitute the name of the subform
for "SubformName"

Forms![MainForm]![SubformName].Form.AllowEdits = True

for 'subformname', are you sure you substituted the name of the subform
*control* in the main form?
 
Back
Top