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 biv343 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 Hans8823

  1. Hans8823

    better way than lots of if's

    What explanation do you want? Since every if statement is the same, only the number is different, so I thought why not use arrays?
  2. Hans8823

    better way than lots of if's

    For i = 1 To 9 If Request.Form("step" & i) <> strStep(i) Then alertstep(i) = True End If For i = 1 To 9 If alertstep(i) Then response.write "Step " & i & " has been updated, you now need to ...." End If
  3. Hans8823

    Date part only of datetime field in ms access

    MS Access and all other databases that I know store dates as datetimes. Even when you enter only a date, it will return this date as a datetime, where the timepart is 00:00:00 The function datevalue returns only the datepart of a string that represents a date(time) but also of a real datetime...
  4. Hans8823

    Random number: Rnd(1) repeats the rnd number series

    You should use the randomize statement with no arguments, to inialize the random-number generator with a seed based on the system timer, before calling Rnd. Randomize For i = 1 To 9 number(i) = Rnd(46) + 1 Next
  5. Hans8823

    Convert day, month, year fields to a date

    Public Function Allowance(ByVal JoiningDate As Date) As Double If Month(JoiningDate) < 4 Then Allowance = DateDiff("d", JoiningDate, DateSerial(Year(JoiningDate), 4, 1)) / 365 * 20 Else Allowance = DateDiff("d", JoiningDate, DateSerial(Year(JoiningDate) + 1, 4, 1)) / 365...
  6. Hans8823

    Type Mismatch Error

    Oh, I'm sorry, it says only type mismatch... However, I think this is still the problem, I've never had a type mismtach error or something by executing the .EOF function!
  7. Hans8823

    Type Mismatch Error

    The first line in the original post
  8. Hans8823

    Type Mismatch Error

    You're all foccusing at the wrong line! The error message is quit clear what is wrong: 'Data type mistmatch in citeria expression' The error occurs in the line: rs.Open SQLQuery, MyConn So the code stops there, the rest of the code will not be executed. You have to look in the WHERE clause...
  9. Hans8823

    Access connection error

    It's not your connection: strSQL = "SELECT Staff.StaffID, Staff.Lname, Staff.Fname, Staff.Address FROM Staff WHERE Staff.StaffID = " & forms![Setup]![Combo5]
  10. Hans8823

    Should I Utilise DB in AppData Folder?

    The discussion whether you should store the default MSSQL 2005 Express Membership database in the App_Data folder or somewhere else is not really an answer to the question. The question was 'if all the data should be tranfered to this database or not?' The answer is NO, you can also build your...
  11. Hans8823

    Advice for a beginner

    Take a look as the ASP.NET 2.0 Data Tutorials to learn more about Data Access Layers: http://www.asp.net/learn/dataaccess/default.aspx?tabid=63
  12. Hans8823

    Convert Time into Minutes

    Who, 3 souls.... All on the same time, amazing
  13. Hans8823

    Working with Months and Years

    Why not use DateSerial and Format? _Year = Year(date()) _Month = Month(date()) For i = 0 to 17 strMonth = Format(DateSerial(_Year, (_Month + i), 1), "mmm yyyy") Next
  14. Hans8823

    Convert Time into Minutes

    value = "144:58:12" arrTime = Split(Value, ":") minutes = arrTime(0) * 60 + arrTime(1)
  15. Hans8823

    Read through the results of a query one record at a time.

    databasepath = "c:\test.mdb" sSQL = "SELECT ID, name FROM test" Set conn = Server.CreateObject("ADODB.Connection") conn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & databasepath Set rsTest = Server.CreateObject("ADODB.Recordset") With rsTest 'to use adLockReadOnly and...

Part and Inventory Search

Back
Top