Search results

  1. M

    Multi criteria davg

    Me.Text11 = Nz(DAvg("[final whse-in diff]", "dbo_inventory", "[CAFETYPE]=" & Me.Text7 And "isnull(me.[DATE FIXED])=" & True And "isnull(me.DATE_IN)=" & True), 0) i am getting a type mismatch error with this. my question is: 1. is the syntax correct 2. Is my way of checking for a value to be...
  2. M

    cdate date conversion

    I would like to convert 2013.11.13 which is a string into a date this is what i have so far but it's not working any ideas 2013 year 11 month 13 day of week Dim strDate As String, dteConvertedDate As Date strDate = 2013.11.13 dteConvertedDate = CDate(Mid$(strDate, 6, 2) & "/" &...
  3. M

    Listed Box Pass selected to a sql sp where statment

    I am trying to pass the results of what is selected in a list box to sql through an ado statement, when i select one result i can pass the value with no issue, when i select multiple item i get a run time error incorrect syntax near ';' i am guessing it is passing the data as a csv to sql and...
  4. M

    Sum of items selected in a list box

    Just some vba help i need to know how to get the sum of column 2 of a list box total bags is in the second column, i only want the total of bags of the ones selected I can get the sum of all the boxes but only want highlighted ones thanks so much Public Function SumListBox(sForm As...
  5. M

    ADODB returning a value from sql sp

    Guys i need help with returning a single value from my sql stored procedure i want to call the sp with vba and return a single value all the code is below any help would be great. 'Access ADODB CODE Dim cn As ADODB.Connection Dim rs As ADODB.Recordset Dim SQLServer As...
  6. M

    vba dynamic hyperlink

    Try to open a pdf with a button in a form using vba - i want it to take the data from me!comp_ID and insert it into the file location and then add .pdf on the end and open it with this i get a type mismatch run time error '13' Thanks for your help Dim strfile As String strfile =...
  7. M

    passing variables to sp

    Dim SQLFutSoldat As Currency----would like to pass this value to my stored procedure but not sure on the sintax on how to pass a second variable to it thanks Dim Response As Integer Response = MsgBox(prompt:="Do You want to clear the DELTA? 'Yes' or 'No'.", Buttons:=vbYesNo) If...
  8. M

    dlook up

    Me.TotalDelta.Value = DLookup("Currentdelta", "dbo_Futurescompositevalues", "Futcompid = Me!Combo58") currentdelta is a colum in a linked table dbo_Futurescompositevalues want to get the value of the currentdelta where futcompid =me!combo58 which is a combo box that has the futcompid id
  9. M

    Returning a value from a sql SP and using in vba to set a form value

    want to take return currentdelta which is one field and display the value in a from Dim cn As ADODB.Connection Dim rs As ADODB.Recordset Dim SQLServer As String Dim Catalog As String Dim SQLString As String Dim SQLInvNo As String Dim comboboxfut As Integer...
  10. M

    insert into a table from a msgbox input

    trying to take what a user enters into a msg box and insert that value into a new record in a table Dim SetPrice As Currency SetPrice = InputBox(Prompt:="Enter New Price Base.", _ Title:="New Price Base", Default:="Enter here") CurrentDb.Execute "INSERT INTO...
  11. M

    vba if statements

    Guys if anyone could help me understand why i get stuck on the one record in the sub table and have to hit escape to go to the next line to enter the next record , i dont get any errors with the code but seems like it is stuck in the loop Private Sub Form_AfterUpdate() 'check for delta...
Back
Top Bottom