Results 1 to 3 of 3
  1. #1
    Join Date
    Apr 2004

    Unanswered: How to get my total text box to work, pls?

    Hi there

    I have this code that I want to work on my total text box and I am not exactly sure how to make this code do the claculation correctly

    Public Function total(AmountinPounds As Currency, commamount as Currency) As Currency
    Dim total As Currency
    If commamount >= 2000 Then
    total = AmountinPounds * 0.3
    total = AmountinPounds + commamount
    End If
    End Function

    On my control total how can I convert this to work. ?

    users would be keying in the commamount for anything less than 2000 but amount above 2000 the computer would automatically mutiple by 0.3 is this a possible? Or how can I go about this.

    This is what I want to put on the control total?

    can anyone help pls?

    Many Thanks

  2. #2
    Join Date
    Sep 2003
    The question you need to ask is"From where does this need to be invoked?"
    Assigning the value itself is easy:


    But you have say from where it will be called from ...
    Back to Access ... ADO is not the way to go for speed ...

  3. #3
    Join Date
    Mar 2004
    Use the IIF statement. i.e.

    =IIF(commamount >= 2000,AmountinPounds * 0.3,AmountinPounds + commamount)

    Download for FREE the ADO/DAO Data Controls that makes life EASIER developing database applications in: VB, FoxPro, Access, VC++, .NET etc... Navigate, Add New, Delete, Update, Search, Undo and Save your changes. Supports Disconnected Recordsets and Transactions!

    Or try our Ask An Expert service to answer any of your questions!

Posting Permissions

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