Referencing form properties from another form

  • Thread starter Thread starter forstatd
  • Start date Start date
F

forstatd

I am stuck......

Hopefully someone can answer why this doesnt work. I
have a form that I created called "Review". On the form I
have a Command Button, that when clicked opens another
form called "Criteria". Also, on the On Click event of
the command button I want to set the Modal=True and set
the navigation buttons off, on the form "Criteria" by
using the following code:

Forms!Criteria.Form.Modal = True
Forms!Criteria.NavigationButtons = False

These two lines of code work good....but I am having a
problem with two additional lines, one to set the
controlbox=True...

Forms!Criteria.ControlBox = True

This brings up an error #2448-You can't assign a value to
this object.

I also would like to lock (locked=true) and disable
(enabled=false) a subform called "Comments"
on "Criteria" The subforms control is called "frmSub".
I have no idea on how to refer to this in code. I have
tried, but get errors..

Forms!Criteria!frmSub.form.enabled=False
Forms!Criteria!frmSub.form.Locked=true

Any ideas as to what I am missing, to get these lines of
code to work. Thanks in advance!
 
-----Original Message-----
Try this instead

Forms!Criteria.Form!frmSub.Enabled=False
Forms!Criteria.Form!frmSub.Locked=True
I tried that also, but I can still click in on the
subform and enter info into controls...doesn't seem to be
locked.........

Thanks for your reply!
 
Back
Top