Results 1 to 2 of 2
  1. #1
    Join Date
    Aug 2004

    Exclamation Unanswered: Refer to different form

    Okay, I have a txtbox called txtHowMany it is programmed to add 1 onto the number every time its used and when it gets to 5 to won't work (TRIAL) now I needed to be able to easily get that 5 bk down to 0 so my friends could experiment without having to delete registry keys or using it 5 times. I have put a form frmReset which has a command button which when pushed sets off the code:

    Dim keyme As String
    keyme = InputBox("Please enter password", "Password", "")
    If keyme = "PASSWORD" Then
    Dim b As Integer
    b = Val(txtHowMany.Text)
    retvalue = GetSetting("A", "0", "Runcount")
    gd$ = Val(retvalue) - b
    SaveSetting "A", "0", "runcount", gd$
    txtHowMany.Text = gd$
    End If

    But txtHowMany is on another form (frmRegister) and the error is Object required meaning txtHowMany can i write code to show a reference to the other form and txtboxes on it

    Hope I explained okay, I knew what i was going on a bout

    Thanx in advance


  2. #2
    Join Date
    Jun 2004
    Arizona, USA
    If another form is loaded, you can refer to objects within it by using the full naming convention of

    "Lisa, in this house, we obey the laws of thermodynamics!" - Homer Simpson
    "I have my standards. They may be low, but I have them!" - Bette Middler
    "It's a book about a Spanish guy named Manual. You should read it." - Dilbert

Posting Permissions

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