Results 1 to 4 of 4
  1. #1
    angie is offline Competent Performer
    Windows 8 Access 2013
    Join Date
    Dec 2013
    Posts
    232

    add to vb code


    Private Sub PaymentType_AfterUpdate()

    Select Case Me.PaymentType

    Case"Financed"

    Me.TotalAmountDue =Me.FinancedPrice

    Case "Cash orcheck"

    Me.TotalAmountDue =Me.CashPrice

    Case Else

    Me.PaymentType ="CREDIT"

    Me.TotalAmountDue =Me.FinancedPrice

    End Select


    End Sub

    I need to add the following to the aboveIf there is an amount in the textbox CostForSystem than the amount inthat text box is what I would like to show in the totalamoutdue text box nomatter what payment type is selected.Thank you

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,525
    1st you need to add the html markups : 'code' - '/code' to your post so we can read the code.

    2nd
    Code:
    Private Sub PaymentType_AfterUpdate() 
    
    Select Case Me.PaymentType 
    Case"Financed" 
     Me.TotalAmountDue =Me.FinancedPrice 
    Case "Cash orcheck" 
     Me.TotalAmountDue =Me.CashPrice 
    Case Else 
     Me.PaymentType ="CREDIT"
     Me.TotalAmountDue =Me.FinancedPrice 
    End Select
    
    if val(CostForSystem) >0 then totalamoutdue = textbox
    
    End Sub

  3. #3
    davegri's Avatar
    davegri is online now Excess Access
    Windows 10 Access 2016
    Join Date
    May 2012
    Location
    Denver
    Posts
    3,413
    I need to add the following to the aboveIf there is an amount in the textbox CostForSystem than the amount inthat text box is what I would like to show in the totalamoutdue text box nomatter what payment type is selected.Thank you
    This is gibberish. Can you express this better?

  4. #4
    angie is offline Competent Performer
    Windows 8 Access 2013
    Join Date
    Dec 2013
    Posts
    232
    When the text box (costforsystem) is entered it updates the Text Box (TotalAmoutDue) but when I select the payment type is removes the amount
    I still need to select the payment type but if there is an amount in the costforsystem field than the default would be that amount
    Example:
    Text Box (CostForSystem) 500.00
    Text Box ( Total Amount Due) 500.00
    Text Box (PaymentType) = you choose from (Finance) (Cash) or (Credit)

    When I enter the payment type it deletes the amount in the TotalAmoutDue , I need the amount to stay in this field no matter what is selected in the paymentType

    The code I am using now (see 1) works great and I still need to use it but wanted to add to it for the CostForSystem.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 20
    Last Post: 10-13-2015, 09:05 AM
  2. Replies: 3
    Last Post: 10-16-2014, 08:49 AM
  3. Replies: 4
    Last Post: 03-10-2014, 12:18 PM
  4. Replies: 7
    Last Post: 05-28-2013, 09:11 AM
  5. Replies: 1
    Last Post: 05-04-2013, 12:19 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums