Recent content by meloncolly

  1. meloncolly

    Checking if a File exists

    the fileexists function is the problem this line makes no sense (to me) FileExists = Dir(strPath) <> vbNullString If you use the DIR function and no file is found, then it returns "" I'd try: Public Function FileExists(strPath As String, Optional lngType As Long) As Boolean Dim Filename as...
  2. meloncolly

    Updating a field based on a certain criteria

    and, more existentially, what is the "first" record you want to find? Firstname, alphabetically? Lastname? Receiptamt - ascending or descending? or is it CLientNO? The field that dictates what is "first" will dictate your solution...
  3. meloncolly

    Action query - deleting records

    sorry, can you post the SQL for your query? The code you've typed is somewhat unclear. What data type is datetimeaa in the salesarchivetable?
  4. meloncolly

    File Browser to Import Dbase

    so, set a variable to get the path and the file. Once you have the full path you can strip out the file name using: Function FileNameOnly(pname) As String ' Returns the filename from a path/filename string Dim i As Integer, length As Integer, temp As String length = Len(pname)...
  5. meloncolly

    Action query - deleting records

    what code are you using? and are you executing a query, or doing it thru vba code?
  6. meloncolly

    Timestamp for the date only

    well, if it's of interest, I tested my input on a SQL server backend timestamp field using access and got exactly the results predicted - date only from a date/time field.
  7. meloncolly

    Timestamp for the date only

    folks, the problem is ckitzman is using SQL Server as the back end; SQL server does indeed store the dates just the way ckitzman says - the .007 is milliseconds. I'd strip out the year, month and date and then re-combine into just a date in a query, then add your criteria (as describe by...
  8. meloncolly

    Compile Error Help

    it's almost certainly to do with references. Open the Visual Basic editor window and go to Tools --> References. Look for a reference with MISSING at the start of it and uncheck it (if there are any) then look for references to 'Microsoft Word X.Y Object Library' and if there are any, tick the...
  9. meloncolly

    create a new row for each table column in query

    select commonfield1, commonfield2, analysisresultfield1 from yourtable union select commonfield1, commonfield2, analysisresultfield2 from yourtable union select commonfield1, commonfield2, analysisresultfieldx from yourtable should do what you need
  10. meloncolly

    Delete Query Message.

    I'd strongly advise you to switch them back on afterwards too. DoCmd.SetWarnings True Whilst they can be annoying, messages are useful. If they are switched off using the code here and not switched on, there's a possibility you'll do something you didn't mean to do, and not be asked to confirm...
  11. meloncolly

    Run-time error '3251'

    Hi, Suggest you change tabella.FindFirst "Numero Scheda = " & stringa to tabella.FindFirst "Numero Scheda = '" & stringa & "'"
Back
Top Bottom