Search results

  1. Travis

    Iteration in code rather than queries?

    There is a way to get the benifits of a QueryDef without having to recreate it each time the code runs (preventing bloat). First Create an Append Query Example: INSERT INTO tblProjection ( [Year], Field1, Field2, Field3 ) SELECT Last([Year]+1) AS NYear, Last([Field1]*1.1) AS NField1...
  2. Travis

    FileSearch Problems

    Private Declare Function PathStripPath Lib "shlwapi" _ Alias "PathStripPathA" _ (ByVal pPath As String) As Long Public Function StripPath(ByVal sPath As String) As String 'Removes the path portion of a 'fully qualified path and file. ' 'The shortened string is returned as...
  3. Travis

    Email multiple recipients from a table

    See http://www.access-programmers.co.uk/forums/showthread.php?s=&threadid=58212&highlight=email
  4. Travis

    Queries

    Your formula produces Monday to Sunday for the week prior to the current date. Example running this query this week: 12/29/2003 (monday) to 1/4/2004 (sunday) will return data for the week of 12/22/2003 to 12/28/2003.
  5. Travis

    Queries

    Unsure of what Correct is as far as this statement goes. However if you are always wanting the Last fully completed Period then yes. ie. If Date()=#12/29/2003# or #12/30/2003# or #12/31/2003# Your formula produces Between #12/22/2003# and #12/28/2003# If Date()=#12/28/2003# Your formula...
  6. Travis

    Copy records with a new AutoNumber

    sSQLQuery = "INSERT INTO Test SELECT [List only the fields that you want to come over] FROM Test WHERE [Flight #] = 'LOUNGE'" cn.Execute sSQLQuery
  7. Travis

    expression that has no value error

    Check to see if you have a NewRecord First: Private Sub Form_Current() 'Check for New Record If NewRecord = False Then If Forms!frmCustomer!subfrmPayment_Sum!You_Owe.Value = 0 Then Me.subfrmPayment_Sum.Visible = False Else...
  8. Travis

    Left() Function

    You either have a missing reference or need to refresh your references. To refresh your references simply remove a reference, close the reference screen and then add the reference back in.
  9. Travis

    Syntax Error in SQL statement

    Try adding this line after you set the strSQL variable Debug.Print strSQL Then copy and paste it into the SQL view of a new query. Then goto design view, if you don't get an error attempt to run it from the query. This should generate the error with more detail.
  10. Travis

    Form Locking

    What version of Access is the Database In? What version of Access are the users using? Have you structured the database so that it has a Front End (FE) and Back End (BE)? Does each user have their own copy of the Front End or are they all accessing the Same File? Have you noticed any other...
  11. Travis

    Help with labels

    Set the labels caption on the load event of your switchboard using DLOOKUP.
  12. Travis

    Add or Remove Users from Workgroup - programatically

    ACC2000: How to Add a User to a Group with CreateUser Method
  13. Travis

    Relationships Affecting Report

    Give us something to look at. possibly a scaled down version with just the tables/reports we need to look at (minimal data).
  14. Travis

    Outlook automation type mismatch

    Paul, look here it might help. http://msdn.microsoft.com/library/default.asp?url=/library/en-us/odc_ol2003_ta/html/odc_olsecnotescomaddins.asp
  15. Travis

    Sorting a Collection

    try here http://www.freevbcode.com/ShowCode.Asp?ID=4522
  16. Travis

    rst.FindFirst - Case Sensitive for String field

    Basically for the module in which you are doing the Find use "Binary" that way "a"<>"A". Just remember that this will be true for all procedures in the module.
  17. Travis

    Extracting out the main directory name

    use Split Dim ArrDir as Variant ArrDir=Split( L:\Data\Subs\test.xls,"\") 'ArrDir will look as follows: 'ArrDir(0)="L:\" 'ArrDir(1)="Data" 'ArrDir(2)="Subs" 'ArrDir(3)="test.xls" 'The Main Directory will then be in ArrDir(1) This will even work for UNC paths.
  18. Travis

    dumb question

    Is the Combo box bound to the data field in the table? Is the Allow Edits of the form set to TRUE? Is the underlying data source read only?
  19. Travis

    jet engine not updating long strings in access

    What is the Defined length of the Access Field? What is the Length of the Variable (String that is)? What is happening is that the data is being truncated because not all of it will fit in the Access Field. The wrong data type being used is the primary reason for this occurring.
  20. Travis

    Set Focus to last record

    What you will need is: 1. A Unique Item to search (Such as the Unique ID of your Customer, which should be in the RecordSet of your DataSheet but does not need to be visible) 2. You will then need a RecordSetClone of the DataSheet 3. Then the Use of the FindFirst and BookMark. 4. This...
Back
Top Bottom