Results 1 to 2 of 2
  1. #1
    Join Date
    Aug 2007

    Unanswered: list box double click using subtraction to decrease numbers

    I have the of following on a frm called frmcharges

    txtAuthorizationNo When a user double clicks the txt box open a form called

    Private Sub txtAuthorization_DblClick(Cancel As Integer)
    Dim stDocName As String
    Dim stLinkCriteria As String

    stDocName = "frmAuthorizationSearchChargeFormList"
    DoCmd.OpenForm stDocName, , , stLinkCriteria
    End Sub

    Now this form frmAuthorizationSearchChargeFormList has a list box called list0 with the following in a record source.

    SELECT qryAuthorizationSearch.AuthorizationID, qryAuthorizationSearch.PersonID, qryAuthorizationSearch.InsuranceName, qryAuthorizationSearch.[Authorization#], qryAuthorizationSearch.SessionsAllowed, qryAuthorizationSearch.StartDate, qryAuthorizationSearch.EndDate, qryAuthorizationSearch.Used, qryAuthorizationSearch.Left
    FROM qryAuthorizationSearch;

    the main focus will be the following fields qrySessionsAllowed,qryUsed,qryLeft

    Lets say sessions allowed are 10 when user double clicks the authorization number qryUsed will be 1, qry Left will be 9 and so forth. I know this has to be on the doucle click event but dont know how to write the code.

    Any Ideas

    Thanks in advance

  2. #2
    Join Date
    Jan 2007
    Provided Answers: 10
    Using the recordsource you have shown, you must physically run an UPDATE SQL statement to change the value.

    Why are you trying to implement this out of interest? What are you trying to achieve?
    Home | Blog

Posting Permissions

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