Results 1 to 4 of 4

Thread: Using Form Name in Subs

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Dec 2000
    Posts
    462
    I am working on a routine that requires the Name of the Form in the public Declaration
    LIke The Following:
    But It will not work Need Help Please.

    ' Where INkey_Text(Index)=An Array of textboxes in the Form

    ' What I have Tryed is

    Public Sub Setform(Index as Integer,Setname as Form)
    Setname (index),Form1)
    End Sub

    Public Sub Do_Change(Index As Integer)
    Setname.Inkey_Text(Index).SetFocus
    Ax$ = Setname.Inkey_Text(Index).Text
    End Sub

    Public Sub Load_State(Pen As Integer)
    For Ak = 1 To Pen
    Do_select (Ak)
    Setname.Inkey_Text(Ak).Text = Control$ ' Enter Formatted Name Here
    Next
    End Sub

    Don

  2. #2

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Dec 2000
    Posts
    462

    Form name in subs

    Martin

    This is part of the program the you help me with earler

    I have modified it and now trying to get the form name so that I can use a Module to
    set the data to the textboxes in a form. Instead of on the form its self.

    Using the universal formatted input routine that I am writing.

    When I do get it done I am going to send you a copy of it for your input.
    Or to tell me there is a better way.


    Don

  4. #4
    Fanatic Member
    Join Date
    Jan 1999
    Location
    UK
    Posts
    554
    As Martin says use the ME keyword anywhere in the FORM code but if your using a module then use the name of the form itself like

    Code:
    MAINFORM.Picture1.Backcolor = vbWhite
    DocZaf
    {;->

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