Search results

  1. P

    FTP blocking

    I think your problem will be the fact that the time the virus scanner takes to scan the file is longer than te timeout for the ftp connection. Don't know if it's possible to increase the timeout in the wininet.dll connection.
  2. P

    ODBC error - trying again

    How are you connected to the server, wired or Wifi? If the network connection temporarily disconnects error 10054 can happen. Microsoft support article on error 10054
  3. P

    error is in the line db.Execute strSQL, dbFailOnError.

    Your strSQL has the number as a string so you wil get a datatype mismatch when trying to run the query. UPDATE Table2 SET Table2.Specialization = 'E' WHERE ((Table2.UnifiedNumber)='681234299')
  4. P

    Units Received Cant Be more than Units Ordered

    I made some changes to your code Private Sub Units_Recived_BeforeUpdate(Cancel As Integer) If NZ(Me.Units_Recived , 0) > NZ(Me.Units_Ordered, 0) Then 'only greater, Received and ordered can be the same MsgBox "Units Received Cannot Be More Than Units Ordered", vbOKOnly...
  5. P

    Units Received Cant Be more than Units Ordered

    In the AfterUpdate event the record is already saved, it should be in the BeforeUpdate event and you should cancel the update.
  6. P

    rs.AddNew ODBC Fail Query timeout expired

    You Dim RS3 and RS4 as recordset, you should explicitly Dim the type of recordset. If it is a linkend table you can use: Dim rs3 As DAO.Recordset Dim rs4 As DAO.Recordset If its a connection in vba to the SQL server it should be: Dim rs3 As ADODB.Recordset Dim rs4 As ADODB.Recordset
  7. P

    Need Help!

    Did you name the module the same as the function? Access won't recognize the function if it is the same.
  8. P

    Emailing from Access

    Your mail field seems to by a hyperlink to adjust for that use instr. To avoid the error message us a error handler like: Private Sub RFIEmail1_Click() Dim strToWhom As String Dim strMsgBody As String Dim strSubject As String On Error GoTo Error_RFIEmail1 strSubject =...
  9. P

    flipping suntax !!!!

    If you open the report in preview and export the report while the preview is open the filtered report is exported.
  10. P

    Access 2003 VBA Help

    You put your sub on the same line as the if ... then, this won't work. You have to put the sup on the next line as JHB suggested. In your case there is no else , elseif and end if.
  11. P

    Query Left - limit by characters but bring whole word

    Use functions left and instr like:Left([yourfieldname];InStr(18;[yourfieldname];" ")-1) Depending on country settings replace ";" by ",".
  12. P

    Opening Excel & PDF files using the shell command

    Did you name the module the same as the function in it? Access doesn't like that.
  13. P

    DateFormat Issue in an Insert Into Routine

    In VBA all dates are handled in American date format, in the table the date is stored as a numeric value based on days after 1-1-1900. If you want the date in the EU format you need to format it. The presentation in the table and in forms does not change the way VBA handles dates.
  14. P

    Adding and editing records fropm unbound fields

    You are pulling a complete table and skip the records you don't need, on a large table this takes more time then filtering it in front. Standard SQL would be even quicker, like: strSQL = "UPDATE OwnershipLog SET OwnershipLog.[Current Owner] = Null " & _ "WHERE...
  15. P

    subscript out of range run time error 9

    Column count starts with zero, the last column is 5.
  16. P

    Problem with Decimal separator

    The Where part of your Dlookup is not complete, the field name is missing. I think it should be: DLookup("Id_Rozklad", "tblRozklad", "sna = " & DMin("sna", "tblRozklad"))
  17. P

    Compare admission date to previous discharge date, VBA

    A query with a calculated field can do this like: SELECT tbl_visit.ID, tbl_visit.admit, tbl_visit.disch, tbl_visit.pt_ID, IIf(DateDiff("d",[admit],DMax("disch","tbl_visit","admit <" & "#" & Format([admit],"mm\/dd\/yyyy") & "#"))<7,"y","n") AS re_admit_status FROM tbl_visit ORDER BY...
  18. P

    get file full path

    The dir function as CJ_London suggested is the way to go but dir returns the short folder / filename if the input is the short variant use dir$ instead. This is a sample I found long time ago. Function GetLongPath(ShortPath As String) As String 'convert short DOS 8.3 style filename to long NTFS...
  19. P

    How to count the number of events based on type?

    You Dim startDate as date If your entry field is empty "startDate = Me.txtStartDate" wil give error 94
  20. P

    How to count the number of events based on type?

    What is the source (fieldname) of the column with #name? The way your SQL works the fieldname will be something like "Expr...."; Change your SQL to "SELECT EventType, Count(EventType) AS CountOfEventType FROM Final GROUP BY EventType;" And set the source of your column to "CountOfEventType"
Top Bottom