Recent content by PeterF

  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.
Top Bottom