Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 2004
    Posts
    4

    Angry Unanswered: Using a form for more things

    HI,

    I made a form, frmSearchUser, which will be used to search for a user in the database.

    Now, I want to use this form two times.

    First function: there is another form, frmSendMail, which is be used to send an mail to a user. To select an user, people have to use the search-form to select a user.

    Second function: frmAdresss, a form used to see the information of an user. First you have to select an user with the Search-Form.

    On all of the 2 forms, there is a button to open the frmSearchUser-form.

    How can I make a function to check from which form the frmSearchUser is be opened?

    This doesn't work: I made a public variable "strVoorwaardeb" in frmSendMail which I filled when somebody clicked the button to open the searchform. In the searchform I set this: " if not Forms.frmcontract.strVoorwaardeb is null then"...
    When the form will be opened from frmSendMail, there is no problem, but when the form will be opened from frmAdress, there is an error "object is null" (Forms.frmcontract.strVoorwaardeb)

    Any idea?
    Thanx in advance!

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

    Smile Re: Using a form for more things

    Originally posted by haai
    HI,

    I made a form, frmSearchUser, which will be used to search for a user in the database.

    Now, I want to use this form two times.

    First function: there is another form, frmSendMail, which is be used to send an mail to a user. To select an user, people have to use the search-form to select a user.

    Second function: frmAdresss, a form used to see the information of an user. First you have to select an user with the Search-Form.

    On all of the 2 forms, there is a button to open the frmSearchUser-form.

    How can I make a function to check from which form the frmSearchUser is be opened?

    This doesn't work: I made a public variable "strVoorwaardeb" in frmSendMail which I filled when somebody clicked the button to open the searchform. In the searchform I set this: " if not Forms.frmcontract.strVoorwaardeb is null then"...
    When the form will be opened from frmSendMail, there is no problem, but when the form will be opened from frmAdress, there is an error "object is null" (Forms.frmcontract.strVoorwaardeb)

    Any idea?
    Thanx in advance!
    You might try passing the form name in the OpenArgs paremater of the OpenForm method of the DoCmd object.
    Gregg


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

  3. #3
    Join Date
    Mar 2004
    Posts
    4
    thx!

    It works!

Posting Permissions

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