Results 1 to 2 of 2

Thread: VBA Question

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jul 2000
    Location
    Vaxjo, Sweden
    Posts
    85
    I have no experience with VBA, but my dad wanted some help with one thing. It's probably very easy:

    I have a form with a subform. The subform loads a bunch of numbers from a database and places a sum in a textbox. How do I get that value to a texbox in the parent form upon load? I don't wanna have to push a button to do it.

    //Anders

  2. #2
    Fanatic Member Gary.Lowe's Avatar
    Join Date
    May 2000
    Location
    In my sphere of influence
    Posts
    621
    Anders

    The following code should work. Place it in the Main forms Formload event

    Code:
    
    frmParent.Mytext = frmSub.subtext
    Gary Lowe
    VB6 (Enterprise) SP5
    ADO 2.6
    SQL Server 7 SP3

    OK I know my spelling and grammer is crap so don't quote me on it!

    To err is human to take the P! is only natural !!

    Click on the top section of image for Marcus Miller website and bottom section of image for 'Run For Cover' sound clip


Posting Permissions

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



Click Here to Expand Forum to Full Width