Results 1 to 4 of 4
  1. #1
    Join Date
    Aug 2003
    Posts
    42

    Unanswered: Is this possible?

    Private Function CalcSqFt(txtEstDeails_Unit) As Single

    End Function

    where "txtEstDeails_Unit" is the value of a control on my report?
    Last edited by waderw24; 07-12-04 at 22:57.

  2. #2
    Join Date
    Sep 2003
    Location
    The extremely Royal borough of Kensington, London
    Posts
    778
    Yes. As an example:

    Private Function test(tf As TextBox) As Integer
    MsgBox tf.Text
    End Function
    Bessie Braddock: Winston, you are drunk!
    Churchill: And Madam, you are ugly. And tomorrow, I'll be sober, and you will still be ugly.

  3. #3
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1
    r123456 is on the money for passing a control.

    Taken in your context, I would actually recommend passing a numeric value instead of a control. It looks like this function may be used by more then just a textbox..


    Private Function CalcSqFt(valueIn As whateverDataTypeYou'rePassingIn) As Single
    'code goes here
    End Function

    Then call it using:

    CalcSqFt(txtBoxName.value)
    oh yeah... documentation... I have heard of that.

    *** What Do You Want In The MS Access Forum? ***

  4. #4
    Join Date
    Aug 2003
    Posts
    42
    Good idea. Thanks both of you for your replies. I will give them a shot.

Posting Permissions

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