mshayanshafi's Profile User Rating: -----

Reputation: 0 Apprentice
Group:
New Members
Active Posts:
6 (0.01 per day)
Joined:
14-December 12
Profile Views:
117
Last Active:
User is offline Dec 25 2012 07:18 PM
Currently:
Offline

Previous Fields

Dream Kudos:
0
Icon   mshayanshafi has not set their status

Posts I've Made

  1. In Topic: Unable to call public function in a form

    Posted 17 Dec 2012

    Ok....thanks....:D
  2. In Topic: Unable to call public function in a form

    Posted 15 Dec 2012

    View Postolibenu, on 15 December 2012 - 06:40 AM, said:

    if the code is running but it is not doing what you want. the next question to ask yourself is this:

    what is the code doing?

    it's being a while i used vb6 but shouldn't *Controls in the loop* be assigned to something? like frm_name.controls or something like that?

    hint: check how many times that loop iterates.


    Problem solved.....Previously,when I pressed the clear button it did not take Controls as frm_supplier.Controls....I rewrote the function something like this....
    Public Sub Clear(frm_name As Form) 'will empty the all fields on the form specified
           Dim a As Control
           For Each a In frm_name.Controls  'find each control in the specified form'
            If TypeOf a Is TextBox Then 'if the control is textbox then the value of the text will be set empty'
            a.Text = ""
            End If
           Next
    End Sub
    
    

    And called it like this in frm_supplier.....
    Private Sub cmd_ClearSupplier_Click()
    Call frm_itemlist.Clear(frm_supplier)
    End Sub
    
    

    I am an amateur so I made the careless mistake.Thanks a million for your help......
    Btw just one last query
    Whats the problem in this code.....I am getting an error that says Invalid use of Property
    Dim frm_name as Form
    frm_name=frm_supplier 
    
    
  3. In Topic: Unable to call public function in a form

    Posted 15 Dec 2012

    still nothing.....its executing but still not doing anything....
    Its executing fine in frm_itemlist.....Its when i try to call it from frm_itemlist it creates a problem.....

    *It creates a problem when I run it from frm_supplier
  4. In Topic: Unable to call public function in a form

    Posted 15 Dec 2012

    And when I put a breakpoint in the fuction it tells me its executing but i cant see the outcome on the form....
  5. In Topic: Unable to call public function in a form

    Posted 15 Dec 2012

    View PostNeku, on 14 December 2012 - 07:31 PM, said:

    do you get any errors when trying to run this code?

    No errors whatsoever....

    View Postmaj3091, on 15 December 2012 - 01:50 AM, said:

    When you say it doesn't execute, have you added a breakpoint within the function when you call it from the other form to confirm this?

    Basically I'm asking, is it not executing at all, or is it executing and not behaving how you expect?

    Its not executing at all.When i click cmd_ClearSupplier all the text boxes in the form should go blank but nothing happens.Seems like the button has got no coding in it.....:(

My Information

Member Title:
New D.I.C Head
Age:
Age Unknown
Birthday:
Birthday Unknown
Gender:

Contact Information

E-mail:
Private

Friends

mshayanshafi hasn't added any friends yet.

Comments

mshayanshafi has no profile comments yet. Why not say hello?