Results 1 to 6 of 6

Thread: [RESOLVED] Adding BAS file to an OCX?

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Aug 2005
    Location
    Up State NY
    Posts
    525

    Resolved [RESOLVED] Adding BAS file to an OCX?

    Is this allowable? I am converting a VBP to and OCX.

  2. #2
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: Adding BAS file to an OCX?

    Are you making a usercontrol?

    If so, then you certainly can add a module to it.

  3. #3

    Thread Starter
    Fanatic Member
    Join Date
    Aug 2005
    Location
    Up State NY
    Posts
    525

    Re: Adding BAS file to an OCX?

    Ok. I can get it to go to the module but cannot find the components on the object
    <vbcode>
    If Txtstreet.Text = "" And Search.Txtlast.Text = ""
    </code>

    I tried it with and with out the control name. How do I refrence it?

  4. #4
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: Adding BAS file to an OCX?

    I'm confused. Are you trying to search something based on the contents of a textbox?

    What will/does this .OCX do?

  5. #5

    Thread Starter
    Fanatic Member
    Join Date
    Aug 2005
    Location
    Up State NY
    Posts
    525

    Re: Adding BAS file to an OCX?

    Yes. I have several textboxes/combo boxes that depending on the data supplied, creates the sqlstring and searches the database.
    I found that typed text in the code will capitalise the names correctly, but as seen in the code, it will not find the textboxes. The controls name is Search and the module Global.
    Stumped on monday morning. Sheesh, the rest of the week better be better

  6. #6
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: Adding BAS file to an OCX?

    It would seem that all of your searching is going to be done on the usercontrol itself where it should be able to recognize all of the controls embedded in it.

    What are you using the module for?

    I whipped together a real simply user control that simple looks at the text in two textboxes and tells me whether the text matches or does not match. When I loaded the .OCX into a project and ran it, it worked just fine.

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