Recent content by Louie

  1. L

    Update record of a table

    strSQL = "UPDATE " & _ strTable & _ "SET " & _ strField " = '" & varValue & "';" An & is missing after strField. the line should read: strSQL = "UPDATE " & _ strTable & _ "SET " & _...
  2. L

    Hiding Text box code

    Try Calling the following module in the after update event of PickReport, BeginningDate, etc.... Call ShowMyButtons(Me,Me!PickReport) Sub ShowMyButtons(f As Form, PickReport As Integer) Dim v As Boolean With Me Select Case (PickReport) Case (1) v = Not...
  3. L

    Error Expected: )

    Cheuschober, You are storing into an argument that is being passed by value. Not a good idea to destroy your input. Use a different string to accunulate your result.
  4. L

    Speed

    You can pass the value of variables from your form to the stored procedure via arguments. If you post something simular to the Select you need to execute, I might be able to help.
  5. L

    Speed

    Have you tried using a stored procedure on SQL Server and executing a pass through query with argument parameters from Access? SQL Server will optimize the stored procedure.
  6. L

    filtering combo box on form using vba

    I think DoCmd.ApplyFilter requires two arguments. A Name and criteria. DoCmd.ApplyFilter x, strFilter You could also use: me.filter = strFilter
  7. L

    Error Expected: )

    Try this function. Public Function DelSpec(Scrub As String, Spec As String) Dim s As String, sL As Integer, p As String, pL As Integer Dim x As String, h As String, i As Integer s = Trim(Scrub) sL = Len(s) p = Trim(Spec) pL = Len(p) x = "" For i = 1 To sL h = Mid(s...
  8. L

    Update bit Field in Access using SQL linked Table

    Are you saying that the update: "Update tblTest set process = -1 where process = 0" Does not set process which is defined as type bit in the SqlServer table? Or are you saying you must use 1 in your application?
  9. L

    Update bit Field in Access using SQL linked Table

    I set up a test and it seems to work fine here. Did you use SqlServer Enterprise Manager to look at the results of the update? Enterprise Manager should show -1 in its display. "Update tblTest set process = true where process = false"
  10. L

    Update bit Field in Access using SQL linked Table

    Bit fields in SQL server are either true (-1) or False (0). Your Update would work for either of those values but not 1. Why do you want it to be 1?
  11. L

    Calculation on specific records in query

    Could you post the two table structures?
  12. L

    Show Zero Appointments

    Cathi, I thought you only wanted appointments for a specific date. If you remove the date criteria, you should get all the data. SELECT DISTINCTROW tblPeople.pkPeopleID, tblPeople.fldFName, tblPeople.fldLName, tblPeople.fldTypeID, tblPeople.fldNotActive, (Select Count(*) From tblAppointments...
  13. L

    Show Zero Appointments

    To save typing I'v shortened some names ( cCount ). Try to use this approach: SELECT DISTINCTROW tblPeople.pkPeopleID, tblPeople.fldFName, tblPeople.fldLName, tblPeople.fldTypeID, tblPeople.fldNotActive, (Select Count(*) From tblAppointments Where (pkPeopleId= tblPeople.pkPeopleId And...
  14. L

    Calculation on specific records in query

    Sorry about that. I gave you bad syntax, wrong number (). Anyway it wouldn't work. Just didn't understand what you are trying to do. Maybe this is what you want. SELECT CalcServicePeriod.ID, CalcServicePeriod.SPStartDate, CalcServicePeriod.SPEndDate, Sum([DailyCons]/[DailyCost]) FROM NSLS...
  15. L

    Show Zero Appointments

    I guess I'm a little confused on your Group By fields. Looks like you are trying to count duplicate records. You are using First() on several fields yet you are grouping on those same fields. Maybe if I saw some data and expected results I could help more.
Back
Top Bottom