Results 1 to 2 of 2
  1. #1
    GraemeG is offline Competent Performer
    Windows Vista Access 2007
    Join Date
    Feb 2011
    Posts
    152

    Cascading combo to list to txtbox calculation?

    Hi,

    I have a form with the following:

    Combobox One - cboFloorCode (cascades to another
    combo)

    Private Sub cboFloorCode_AfterUpdate()
    Dim strSource As String

    strSource = "SELECT SORdescription " & _
    "FROM
    SORV4_BR_FLOOR " & _
    "WHERE SORshortdesc = '" &
    Me.cboFloorCode & "' ORDER BY SORshortdesc"
    Me.cboFloorDesc.RowSource =
    strSource
    Me.cboFloorDesc = vbNullString
    End Sub

    Combobox Two - cboFloorDesc (cascades to a
    listbox)




    Private Sub cboFloorDesc_AfterUpdate()
    Dim strSource As String

    strSource = "SELECT baseprice " & _
    "FROM SORV4_BR_FLOOR "
    & _
    "WHERE SORdescription = '" & Me.cboFloorDesc &
    "' ORDER BY SORdescription"
    Me.txtFloorBase.RowSource = strSource

    Me.txtFloorBase = vbNullString
    End Sub


    But then in this txtFloorBase is a cost which then I want another txtbox to
    calculate this cost times the quantity entered in another textbox.

    Thanks

  2. #2
    GraemeG is offline Competent Performer
    Windows Vista Access 2007
    Join Date
    Feb 2011
    Posts
    152
    I have solved this by doing a query then using the control source to view the
    query. However how can I get the calculation to refresh live on update. i.e. it
    updates once the form is closed and reopened.

    Thanks

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

Similar Threads

  1. Replies: 2
    Last Post: 05-27-2011, 08:12 AM
  2. Cascading Combo Box Help
    By euphoricdrop in forum Forms
    Replies: 3
    Last Post: 04-12-2011, 05:35 PM
  3. Combo box disabling other txtbox
    By GraemeG in forum Programming
    Replies: 2
    Last Post: 02-13-2011, 01:21 PM
  4. cascading combo
    By rexb in forum Forms
    Replies: 9
    Last Post: 10-26-2009, 04:10 PM
  5. Replies: 0
    Last Post: 08-13-2008, 03:15 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