Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Recent content by mik18

  1. mik18

    Interval between two date/time fields

    NewTime = Format(DateDiff("s",StartDate,EndDate),"hh:nn:ss") The format part may work though I have never tried it. If not, still use the datediff function to get the time interval in seconds then build that into hours minutes and seconds. mike
  2. mik18

    Openrecordset

    You need to establish the connection before you open the recordset. Set cn = CurrentProject.Connection mike
  3. mik18

    Query calculating days

    OK. This was a question I posted in a crystal forum asking relativily the same question. You will have to modify this slightly for your use but it gets the idea. mik18 (MIS) Jun 24, 2004 Is there any way to take a date in the form of a week and year (ex. Week 25, 2004) and find the start and...
  4. mik18

    Query calculating days

    The DatePart Function allows you to specify the start of the week. In your case Monday. You want to use this function on the FillDate. DatePart("ww", Filldate, 2) this will return the week number the FillDate occured in. If you group on this field and count the number of scripts you have what...
  5. mik18

    Form based on Crosstab Query

    In my exmple i only had 7 columns and I wanted to keep them all. When do you filter your results based on user? Before or after you run the crosstab.
  6. mik18

    How can I ensure calculated field will alway be positive

    Use the absolute value function Abs(). mike
  7. mik18

    Calculation/point system

    You can do this a couple of different ways. The first that comes to mind is to use IIF statements. SELECT IIF([field 1]="yes",1,0)As One, IIF([field 2]="yes",1,0)As Two, IIF([field 3]="yes",1,0) As Three, One+Two+Three As Total FROM tablename; mike
  8. mik18

    Sending Email from Continuous Form

    Is the query appending the correct record? If so, assign the values to variables and pass the variables to the email portion of the code. Mike
  9. mik18

    Form based on Crosstab Query

    I had to do something like this jsut recently. You need to take a couple of steps back from the crosstab query to make this work. I'm sure the column headings in the crosstab you want displayed even if there is null values. To do this you need a query that selects the column values you want...
  10. mik18

    Getting error with DateDiff

    Have them update to Outlook 2003.
  11. mik18

    adding or subtracting a date by months?

    Use the DateAdd Function DateAdd("m", -6, Date()) Check out the help in access to see all the options for the first parameter. good luck mike
  12. mik18

    Way of referring to a previous row in a table using vba?

    The WHERE Clause would need a unique identifier to know which record to pull the TimeIn field from. If it is in the previous row then you could return the entire dataset, use the rst.Find command to move to the current record, then use the rst.MovePrevious command. Hope this helps. mike
  13. mik18

    Way of referring to a previous row in a table using vba?

    You can use a recordset to retreive the TimeIn of the previous record. Dim qry as String Dim cnn As New ADODB.Connection Dim rst As New ADODB.Recordset Dim v_TimeIn As ??? Set cnn = CurrentProject.Connection qry = "SELECT TimeIn FROM TableName WHERE criteria match = ??" rst.open qry,cnn...
  14. mik18

    Adding or Subtracting a Date by 1 Day

    Function DateAdd(Interval As String, Number As Double, Date) Yesterday = DateAdd("d", -1, Date()) Tomorrow = DateAdd("d", 1, Date()) mike
  15. mik18

    Importing large amount of data from a remote database into access

    Try setting up a linked table(s) to the remote database and using a make table query. After you initially make the table you can just use an append query that captures only unique records to update the local table(s). mike

Part and Inventory Search

Back
Top