Welcome to SPN

Register and Join the most happening forum of Sikh community & intellectuals from around the world.

Sign Up Now!

Controlling edit

Discussion in 'Information Technology' started by John, Jul 28, 2006.

  1. John

    John
    Expand Collapse
    Guest

    Hi

    How can I programmatically block edits on a form and all its sub forms? I
    have tried me.AllowEdits = False but it only blocks edits on the main form
    and not on any of the sub forms on the main form.

    Thanks

    Regards
     
  2. Loading...

    Similar Threads Forum Date
    General Controlling Kaam (Lust) Hard Talk Apr 8, 2014
    Money and Controlling Spending Questions and Answers Nov 18, 2011
    USA Anti-Islam pastor called controlling, "mad" Breaking News Sep 13, 2010
    Opinion Manmohan Singh Phenomenon: India's Grand Strategy of Controlling the Thought of Sikhs Breaking News Jul 8, 2010
    Technique Of Controlling Mind Gurmat Vichaar Jan 27, 2008

  3. tina

    tina
    Expand Collapse
    Guest

    to prevent edits on a subform, from code that runs in the main form, try

    Me!SubformControlName.Form.AllowEdits = False

    make sure you use the name of the subform *control* in the main form, not
    the name of the subform as it appears in the database window. the two names
    are not always the same.

    hth


    "John" <John@nospam.infovis.co.uk> wrote in message
    news:%23JtCg7bkGHA.4212@TK2MSFTNGP03.phx.gbl...
    > Hi
    >
    > How can I programmatically block edits on a form and all its sub forms? I
    > have tried me.AllowEdits = False but it only blocks edits on the main form
    > and not on any of the sub forms on the main form.
    >
    > Thanks
    >
    > Regards
    >
    >
    >
     
  4. John

    John
    Expand Collapse
    Guest

    Sorry, I should have been clearer. The sub form only has a tab control on it
    and then each tab in turn has a sub form on it. I am trying to block one of
    the sub forms on the tab control, so I have tried this;

    Forms![Main]![SubForm1].Form![SubSubForm1].Form.AllowEdits = False

    But this has not worked. Any ideas?

    Thanks

    Regards

    "tina" <nospam@address.com> wrote in message
    news:soLkg.200404$Fs1.37657@bgtnsc05-news.ops.worldnet.att.net...
    > to prevent edits on a subform, from code that runs in the main form, try
    >
    > Me!SubformControlName.Form.AllowEdits = False
    >
    > make sure you use the name of the subform *control* in the main form, not
    > the name of the subform as it appears in the database window. the two
    > names
    > are not always the same.
    >
    > hth
    >
    >
    > "John" <John@nospam.infovis.co.uk> wrote in message
    > news:%23JtCg7bkGHA.4212@TK2MSFTNGP03.phx.gbl...
    >> Hi
    >>
    >> How can I programmatically block edits on a form and all its sub forms? I
    >> have tried me.AllowEdits = False but it only blocks edits on the main
    >> form
    >> and not on any of the sub forms on the main form.
    >>
    >> Thanks
    >>
    >> Regards
    >>
    >>
    >>

    >
    >
     
  5. tina

    tina
    Expand Collapse
    Guest

    where is the code running? in the main form? first level subform? or one of
    the second level subforms? if the latter, is the code intended to change the
    sub-subform it's running in, or one of the other sub-subforms?

    hth


    "John" <John@nospam.infovis.co.uk> wrote in message
    news:ukoudfikGHA.1204@TK2MSFTNGP02.phx.gbl...
    > Sorry, I should have been clearer. The sub form only has a tab control on

    it
    > and then each tab in turn has a sub form on it. I am trying to block one

    of
    > the sub forms on the tab control, so I have tried this;
    >
    > Forms![Main]![SubForm1].Form![SubSubForm1].Form.AllowEdits = False
    >
    > But this has not worked. Any ideas?
    >
    > Thanks
    >
    > Regards
    >
    > "tina" <nospam@address.com> wrote in message
    > news:soLkg.200404$Fs1.37657@bgtnsc05-news.ops.worldnet.att.net...
    > > to prevent edits on a subform, from code that runs in the main form, try
    > >
    > > Me!SubformControlName.Form.AllowEdits = False
    > >
    > > make sure you use the name of the subform *control* in the main form,

    not
    > > the name of the subform as it appears in the database window. the two
    > > names
    > > are not always the same.
    > >
    > > hth
    > >
    > >
    > > "John" <John@nospam.infovis.co.uk> wrote in message
    > > news:%23JtCg7bkGHA.4212@TK2MSFTNGP03.phx.gbl...
    > >> Hi
    > >>
    > >> How can I programmatically block edits on a form and all its sub forms?

    I
    > >> have tried me.AllowEdits = False but it only blocks edits on the main
    > >> form
    > >> and not on any of the sub forms on the main form.
    > >>
    > >> Thanks
    > >>
    > >> Regards
    > >>
    > >>
    > >>

    > >
    > >

    >
    >
     
  6. John

    John
    Expand Collapse
    Guest

    Code is running on the main form.

    Thanks

    Regards

    "tina" <nospam@address.com> wrote in message
    news:Hi1lg.205403$Fs1.86551@bgtnsc05-news.ops.worldnet.att.net...
    > where is the code running? in the main form? first level subform? or one
    > of
    > the second level subforms? if the latter, is the code intended to change
    > the
    > sub-subform it's running in, or one of the other sub-subforms?
    >
    > hth
    >
    >
    > "John" <John@nospam.infovis.co.uk> wrote in message
    > news:ukoudfikGHA.1204@TK2MSFTNGP02.phx.gbl...
    >> Sorry, I should have been clearer. The sub form only has a tab control on

    > it
    >> and then each tab in turn has a sub form on it. I am trying to block one

    > of
    >> the sub forms on the tab control, so I have tried this;
    >>
    >> Forms![Main]![SubForm1].Form![SubSubForm1].Form.AllowEdits = False
    >>
    >> But this has not worked. Any ideas?
    >>
    >> Thanks
    >>
    >> Regards
    >>
    >> "tina" <nospam@address.com> wrote in message
    >> news:soLkg.200404$Fs1.37657@bgtnsc05-news.ops.worldnet.att.net...
    >> > to prevent edits on a subform, from code that runs in the main form,
    >> > try
    >> >
    >> > Me!SubformControlName.Form.AllowEdits = False
    >> >
    >> > make sure you use the name of the subform *control* in the main form,

    > not
    >> > the name of the subform as it appears in the database window. the two
    >> > names
    >> > are not always the same.
    >> >
    >> > hth
    >> >
    >> >
    >> > "John" <John@nospam.infovis.co.uk> wrote in message
    >> > news:%23JtCg7bkGHA.4212@TK2MSFTNGP03.phx.gbl...
    >> >> Hi
    >> >>
    >> >> How can I programmatically block edits on a form and all its sub
    >> >> forms?

    > I
    >> >> have tried me.AllowEdits = False but it only blocks edits on the main
    >> >> form
    >> >> and not on any of the sub forms on the main form.
    >> >>
    >> >> Thanks
    >> >>
    >> >> Regards
    >> >>
    >> >>
    >> >>
    >> >
    >> >

    >>
    >>

    >
    >
     
  7. tina

    tina
    Expand Collapse
    Guest

    ok, try

    Me!Subform1ControlName.Form!SubSubForm1ControlName.Form.AllowEdits =
    False

    the above goes all on one line, of course. and again, make sure you're using
    the name of the subform *control* in each subform reference, NOT the name of
    the subform form object in the database window - they're not always the
    same.

    if the above doesn't work for some reason, try just locking the subform
    control itself - i've used that technique successfully in the past, as

    Me!Subform1ControlName.Form!SubSubForm1ControlName.Locked = True

    again, the above is all on one line.

    hth


    "John" <John@nospam.infovis.co.uk> wrote in message
    news:u8YglDskGHA.4284@TK2MSFTNGP05.phx.gbl...
    > Code is running on the main form.
    >
    > Thanks
    >
    > Regards
    >
    > "tina" <nospam@address.com> wrote in message
    > news:Hi1lg.205403$Fs1.86551@bgtnsc05-news.ops.worldnet.att.net...
    > > where is the code running? in the main form? first level subform? or one
    > > of
    > > the second level subforms? if the latter, is the code intended to change
    > > the
    > > sub-subform it's running in, or one of the other sub-subforms?
    > >
    > > hth
    > >
    > >
    > > "John" <John@nospam.infovis.co.uk> wrote in message
    > > news:ukoudfikGHA.1204@TK2MSFTNGP02.phx.gbl...
    > >> Sorry, I should have been clearer. The sub form only has a tab control

    on
    > > it
    > >> and then each tab in turn has a sub form on it. I am trying to block

    one
    > > of
    > >> the sub forms on the tab control, so I have tried this;
    > >>
    > >> Forms![Main]![SubForm1].Form![SubSubForm1].Form.AllowEdits = False
    > >>
    > >> But this has not worked. Any ideas?
    > >>
    > >> Thanks
    > >>
    > >> Regards
    > >>
    > >> "tina" <nospam@address.com> wrote in message
    > >> news:soLkg.200404$Fs1.37657@bgtnsc05-news.ops.worldnet.att.net...
    > >> > to prevent edits on a subform, from code that runs in the main form,
    > >> > try
    > >> >
    > >> > Me!SubformControlName.Form.AllowEdits = False
    > >> >
    > >> > make sure you use the name of the subform *control* in the main form,

    > > not
    > >> > the name of the subform as it appears in the database window. the two
    > >> > names
    > >> > are not always the same.
    > >> >
    > >> > hth
    > >> >
    > >> >
    > >> > "John" <John@nospam.infovis.co.uk> wrote in message
    > >> > news:%23JtCg7bkGHA.4212@TK2MSFTNGP03.phx.gbl...
    > >> >> Hi
    > >> >>
    > >> >> How can I programmatically block edits on a form and all its sub
    > >> >> forms?

    > > I
    > >> >> have tried me.AllowEdits = False but it only blocks edits on the

    main
    > >> >> form
    > >> >> and not on any of the sub forms on the main form.
    > >> >>
    > >> >> Thanks
    > >> >>
    > >> >> Regards
    > >> >>
    > >> >>
    > >> >>
    > >> >
    > >> >
    > >>
    > >>

    > >
    > >

    >
    >
     
  8. John

    John
    Expand Collapse
    Guest

    Hi

    Locked worked for me. Thanks. I don't know why allow edits didn't. May be a
    little known bug.

    Regards


    "tina" <nospam@address.com> wrote in message
    news:Lodlg.37615$mF2.5180@bgtnsc04-news.ops.worldnet.att.net...
    > ok, try
    >
    > Me!Subform1ControlName.Form!SubSubForm1ControlName.Form.AllowEdits =
    > False
    >
    > the above goes all on one line, of course. and again, make sure you're
    > using
    > the name of the subform *control* in each subform reference, NOT the name
    > of
    > the subform form object in the database window - they're not always the
    > same.
    >
    > if the above doesn't work for some reason, try just locking the subform
    > control itself - i've used that technique successfully in the past, as
    >
    > Me!Subform1ControlName.Form!SubSubForm1ControlName.Locked = True
    >
    > again, the above is all on one line.
    >
    > hth
    >
    >
    > "John" <John@nospam.infovis.co.uk> wrote in message
    > news:u8YglDskGHA.4284@TK2MSFTNGP05.phx.gbl...
    >> Code is running on the main form.
    >>
    >> Thanks
    >>
    >> Regards
    >>
    >> "tina" <nospam@address.com> wrote in message
    >> news:Hi1lg.205403$Fs1.86551@bgtnsc05-news.ops.worldnet.att.net...
    >> > where is the code running? in the main form? first level subform? or
    >> > one
    >> > of
    >> > the second level subforms? if the latter, is the code intended to
    >> > change
    >> > the
    >> > sub-subform it's running in, or one of the other sub-subforms?
    >> >
    >> > hth
    >> >
    >> >
    >> > "John" <John@nospam.infovis.co.uk> wrote in message
    >> > news:ukoudfikGHA.1204@TK2MSFTNGP02.phx.gbl...
    >> >> Sorry, I should have been clearer. The sub form only has a tab control

    > on
    >> > it
    >> >> and then each tab in turn has a sub form on it. I am trying to block

    > one
    >> > of
    >> >> the sub forms on the tab control, so I have tried this;
    >> >>
    >> >> Forms![Main]![SubForm1].Form![SubSubForm1].Form.AllowEdits = False
    >> >>
    >> >> But this has not worked. Any ideas?
    >> >>
    >> >> Thanks
    >> >>
    >> >> Regards
    >> >>
    >> >> "tina" <nospam@address.com> wrote in message
    >> >> news:soLkg.200404$Fs1.37657@bgtnsc05-news.ops.worldnet.att.net...
    >> >> > to prevent edits on a subform, from code that runs in the main form,
    >> >> > try
    >> >> >
    >> >> > Me!SubformControlName.Form.AllowEdits = False
    >> >> >
    >> >> > make sure you use the name of the subform *control* in the main
    >> >> > form,
    >> > not
    >> >> > the name of the subform as it appears in the database window. the
    >> >> > two
    >> >> > names
    >> >> > are not always the same.
    >> >> >
    >> >> > hth
    >> >> >
    >> >> >
    >> >> > "John" <John@nospam.infovis.co.uk> wrote in message
    >> >> > news:%23JtCg7bkGHA.4212@TK2MSFTNGP03.phx.gbl...
    >> >> >> Hi
    >> >> >>
    >> >> >> How can I programmatically block edits on a form and all its sub
    >> >> >> forms?
    >> > I
    >> >> >> have tried me.AllowEdits = False but it only blocks edits on the

    > main
    >> >> >> form
    >> >> >> and not on any of the sub forms on the main form.
    >> >> >>
    >> >> >> Thanks
    >> >> >>
    >> >> >> Regards
    >> >> >>
    >> >> >>
    >> >> >>
    >> >> >
    >> >> >
    >> >>
    >> >>
    >> >
    >> >

    >>
    >>

    >
    >
     
  9. tina

    tina
    Expand Collapse
    Guest

    you're welcome :)


    "John" <John@nospam.infovis.co.uk> wrote in message
    news:OJ7nWc5kGHA.3936@TK2MSFTNGP05.phx.gbl...
    > Hi
    >
    > Locked worked for me. Thanks. I don't know why allow edits didn't. May be

    a
    > little known bug.
    >
    > Regards
    >
    >
    > "tina" <nospam@address.com> wrote in message
    > news:Lodlg.37615$mF2.5180@bgtnsc04-news.ops.worldnet.att.net...
    > > ok, try
    > >
    > > Me!Subform1ControlName.Form!SubSubForm1ControlName.Form.AllowEdits =
    > > False
    > >
    > > the above goes all on one line, of course. and again, make sure you're
    > > using
    > > the name of the subform *control* in each subform reference, NOT the

    name
    > > of
    > > the subform form object in the database window - they're not always the
    > > same.
    > >
    > > if the above doesn't work for some reason, try just locking the subform
    > > control itself - i've used that technique successfully in the past, as
    > >
    > > Me!Subform1ControlName.Form!SubSubForm1ControlName.Locked = True
    > >
    > > again, the above is all on one line.
    > >
    > > hth
    > >
    > >
    > > "John" <John@nospam.infovis.co.uk> wrote in message
    > > news:u8YglDskGHA.4284@TK2MSFTNGP05.phx.gbl...
    > >> Code is running on the main form.
    > >>
    > >> Thanks
    > >>
    > >> Regards
    > >>
    > >> "tina" <nospam@address.com> wrote in message
    > >> news:Hi1lg.205403$Fs1.86551@bgtnsc05-news.ops.worldnet.att.net...
    > >> > where is the code running? in the main form? first level subform? or
    > >> > one
    > >> > of
    > >> > the second level subforms? if the latter, is the code intended to
    > >> > change
    > >> > the
    > >> > sub-subform it's running in, or one of the other sub-subforms?
    > >> >
    > >> > hth
    > >> >
    > >> >
    > >> > "John" <John@nospam.infovis.co.uk> wrote in message
    > >> > news:ukoudfikGHA.1204@TK2MSFTNGP02.phx.gbl...
    > >> >> Sorry, I should have been clearer. The sub form only has a tab

    control
    > > on
    > >> > it
    > >> >> and then each tab in turn has a sub form on it. I am trying to block

    > > one
    > >> > of
    > >> >> the sub forms on the tab control, so I have tried this;
    > >> >>
    > >> >> Forms![Main]![SubForm1].Form![SubSubForm1].Form.AllowEdits = False
    > >> >>
    > >> >> But this has not worked. Any ideas?
    > >> >>
    > >> >> Thanks
    > >> >>
    > >> >> Regards
    > >> >>
    > >> >> "tina" <nospam@address.com> wrote in message
    > >> >> news:soLkg.200404$Fs1.37657@bgtnsc05-news.ops.worldnet.att.net...
    > >> >> > to prevent edits on a subform, from code that runs in the main

    form,
    > >> >> > try
    > >> >> >
    > >> >> > Me!SubformControlName.Form.AllowEdits = False
    > >> >> >
    > >> >> > make sure you use the name of the subform *control* in the main
    > >> >> > form,
    > >> > not
    > >> >> > the name of the subform as it appears in the database window. the
    > >> >> > two
    > >> >> > names
    > >> >> > are not always the same.
    > >> >> >
    > >> >> > hth
    > >> >> >
    > >> >> >
    > >> >> > "John" <John@nospam.infovis.co.uk> wrote in message
    > >> >> > news:%23JtCg7bkGHA.4212@TK2MSFTNGP03.phx.gbl...
    > >> >> >> Hi
    > >> >> >>
    > >> >> >> How can I programmatically block edits on a form and all its sub
    > >> >> >> forms?
    > >> > I
    > >> >> >> have tried me.AllowEdits = False but it only blocks edits on the

    > > main
    > >> >> >> form
    > >> >> >> and not on any of the sub forms on the main form.
    > >> >> >>
    > >> >> >> Thanks
    > >> >> >>
    > >> >> >> Regards
    > >> >> >>
    > >> >> >>
    > >> >> >>
    > >> >> >
    > >> >> >
    > >> >>
    > >> >>
    > >> >
    > >> >
    > >>
    > >>

    > >
    > >

    >
    >
     

Share This Page