Results 1 to 4 of 4

Thread: Simple Question

  1. #1
    Join Date
    Nov 2003
    Posts
    150

    Unanswered: Simple Question

    Hi,

    I need to update fields in a form in the after update event of a few controls in 2 subforms. What would the code have to look like to do this?

    I know how to do it within the same form, but i get errors when trying to reference the parent form from any of it's subforms...

    isnt the command something like this :

    FormName.ControlName.Value = bla bla bla....?

    thanks!
    Cheers!

    Mr.Crud

    There are 10 kinds of people, ones that understand digital, others that dont

  2. #2
    Join Date
    Sep 2003
    Location
    MI
    Posts
    3,713

    Re: Simple Question

    Originally posted by MrCrud
    Hi,

    I need to update fields in a form in the after update event of a few controls in 2 subforms. What would the code have to look like to do this?

    I know how to do it within the same form, but i get errors when trying to reference the parent form from any of it's subforms...

    isnt the command something like this :

    FormName.ControlName.Value = bla bla bla....?

    thanks!
    Something like:

    Forms![Purchase Request]!TotCostBookTxt.Requery

  3. #3
    Join Date
    Oct 2003
    Location
    Roanoke, Va
    Posts
    445

    Re: Simple Question

    Originally posted by MrCrud
    Hi,

    I need to update fields in a form in the after update event of a few controls in 2 subforms. What would the code have to look like to do this?

    I know how to do it within the same form, but i get errors when trying to reference the parent form from any of it's subforms...

    isnt the command something like this :

    FormName.ControlName.Value = bla bla bla....?

    thanks!
    Me.Parent.ControlName should also work.
    Gregg


    DAO, ADO, SQL, Automation and anything else I can pick up.

  4. #4
    Join Date
    Nov 2003
    Posts
    150
    thanks guys!

    Cheers!
    Cheers!

    Mr.Crud

    There are 10 kinds of people, ones that understand digital, others that dont

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •