Search results

  1. N

    number format in listbox

    Use the Format$ function to get the number to look the way you want. Format$(X,"#,##")
  2. N

    Use Listview to mimic Treeview

    My project has a listview with 5 columns. My data will have groups and subgroups like a treeview. I'd like to use space and the Unicode characters ChrW(&H2514), ChrW(&H251c), ChrW(&H2502). Does anyone know some code that can produce something like the attachement? Thanks! :)
  3. N

    Trying to elimnate locking errors.

    I found my problem. I would set the form's recordset property to Snapshot which forced only one user to gain access to the db.
  4. N

    Comparing LanUserID to a tblUsers UserID

    (cough cough) i don't any more (cough cough) That was the offical Micro$suck code.
  5. N

    cbo problem in Ac2k

    Different event Try using the OnEnter event.
  6. N

    Need TRIM Advice!

    yep Never tried that. Let's do an experiment. str="abcdefgh" Mid(str,len(str)/2,len(str)/4) The helpless file says: Mid(string, start[, length]) Therefore the above experssion would produce "de" (len(str)/2 for the starting character and len(str)/4 for the number of characters to return) :D
  7. N

    Need TRIM Advice!

    Error explained-edited You will receive an error if you apply Left$, Mid$, Right$ or Trim$ on a field that is null.
  8. N

    Need TRIM Advice!

    Len() question Len() is the length of the string. So if you want the all but 5 characters from the left side of a string but don't know the length of the string you can use: str="abcdefgh" Left(str, len(str)-5) -> "abc" btw, right("abcdefgh",0) yields an empty string because your returning...
  9. N

    Need TRIM Advice!

    You'll also receive an error when: str="asdfgf" Len(str)=6 Left(str,len(str)-9)= ERROR because len(str)-9 is a negative number.
  10. N

    Latest Date

    SELECT Max(Table1.NextServiceDate) AS NextServiceDate FROM Table1;
  11. N

    Need TRIM Advice!

    Error explained If you use Left$, Mid$, Right$ or Trim$ as a function in a query you will receive a Data type mismatch error if the a field is null. The $ in the function dictates that a string is returned. If you use Left, Mid, Right or Trim a variant is returned and you won't recieve the error.
  12. N

    Find current tab open?

    The answer to all your questions is in this box... Assumptions: Page1 is named "General", PageIndex 0 Page2 is named "Piping", PageIndex 1 Private Sub cmdPrintModule_Click() Select Case Tab1 ' or Tab1.Value -- It defaults to .Value anyway. Case 0 PrintGeneral Case 1...
  13. N

    SQL Action subroutine

    Is this a good strategy? Public Function SQL_Action(strSQL As String, Optional fWS As Boolean = False) As Boolean On Error GoTo ErrorHandler Dim db As Database Dim sngStart As Single Dim wrk As Workspace Screen.MousePointer = 11 Try: Set db = CurrentDb If fWS Then Set wrk =...
  14. N

    Record Locking ?

    Ah-HA! Someone had terminated their fe incorrectly. May be they just turned off their computer. In any case there was still a table or query "open". Moving the be to a new directory or disk will clear this. :D
  15. N

    Dynamic table linking

    Does anyone know how Access can search a fe .mdb's/.mde's directory for the be .mdb's/.mde's and then automatically link to the be's tables?
  16. N

    Trying to elimnate locking errors.

    I have networked frontend and backend databases. I'm also experiencing locking errors (3051) when two or more people are using the frontend interface. I always .close and =nothing any CurrentDB or recordset object. All SQL is executed in the following sub: ' Mouse pointer property Global Const...
  17. N

    rst.close vs. set rst=nothing

    Which is better, closing a database or recordset object with .close or by setting it to nothing?
  18. N

    Getting Module & Sub/Function Names

    I employ an error handler that reports the form name and control where the error occured. ErrorHandler Name, ActiveControl.Name & "_KeyPress", _ "KeyAscii: " & KeyAscii It works great untill we move on to modules. I would like to have the code discover the sub/function & module names...
  19. N

    Comparing LanUserID to a tblUsers UserID

    Here 'ya go: Option Base 0 Option Compare Database Option Explicit Option Private Module Private Declare Function SysGetUserName Lib "advapi32.dll" Alias "GetUserNameA" _ (ByVal lpBuffer As String, nSize As Long) As Long ' Double-quote Chr$(34) Global Const DBQ As String = """"...
Back
Top Bottom