Recent content by itsmarkdavies

  1. I

    Co-Existence 2002 / 97

    Thanks Thanks for the info. "commandolomo". I`ll give it a try.
  2. I

    Co-Existence 2002 / 97

    Could anyone tell me if there are any known problems installing Access 2002 and Access 97 on the same machine ?. I want to run both on my Windows 98 Laptop if this is possible. Thanks for your help.
  3. I

    Do While loop not fully functioning

    Sorry, I think I missed the point of what you are trying to do, try the following instead. It should point you in the right direction :- Dim Qty As Integer rst.MoveFirst Do While Not rst.EOF Qty = rst.SupQty 'edit a record in our recordset rst.Fields("Act") = -1...
  4. I

    Do While loop not fully functioning

    Try this :- Do While Not rst.EOF ' edit a record in our recordset rst.Fields("Act") = -1 rst.Update ' Process active record whilst quantity is greater than 500 Do While rst.SupQty > 499 DoCmd.SetWarnings False DoCmd.OpenQuery "qapp_tblTmpDispLab2" DoCmd.OpenQuery...
  5. I

    refreshing controls..

    To reset a Combo Box after you have made a selection from it you can use :- Forms!frmPERSON!cboPERSON = Null To refresh the data in a Combo Box you can use :- Forms!frmPERSON!cboPERSON.Requery Hope this helps.
  6. I

    Error in SQL statement

    rs.RecordCount tends not to return the correct count unless you do a MoveLast first. If I were you i`d put the RecordCount into a variable and amend your code something like this :- Dim HighestNumber As Integer Dim HighestVersion As Integer Dim RecCount int rs.Movelast RecCount =...
  7. I

    Return the name of a month????

    I would use an Array, it`s easier and quicker. Create this Function :- Public Function FindMonth(MonthNo As Integer) Dim MyMonths(1 To 12) As String MyMonths(1) = "JAN" MyMonths(2) = "FEB" MyMonths(3) = "MAR" MyMonths(4) = "APR" MyMonths(5) = "MAY" MyMonths(6) = "JUN" MyMonths(7) = "JUL"...
  8. I

    Using OR in an IIF statement

    You can embed Iif`s within Iif`s. Try something like the following :- txtResult.Text = IIf(IsDate([txtPrev]), (IIf(txtDays.Text = 1 Or 6 Or 8, DateDiff("d", [txtPrev], [ActivityDate]), "0")), "0")
  9. I

    Finding out what drives I have

    Just add d.DriveType to your MsgBox line, or specify what sort of Drive you want in the Code (it is currently set to 3). Drive types are as follows :- 0 = "Unknown" 1 = "Removable" 2 = "Fixed" 3 = "Network" 4 = "CD-ROM" 5 = "RAM Disk"
  10. I

    Finding out what drives I have

    Try This :- Public Function FolderInformation() Dim fso As Object Dim Drive_Message As String Dim dc As Object Dim n As String Dim d As Object On Error GoTo diskerror Set fso = CreateObject("Scripting.FileSystemObject") Set dc = fso.Drives For Each d In dc Drive_Message = Drive_Message &...
  11. I

    FTP

    I need to send a file via FTP from an Access 2000 Module, but I cannot hard code the filename to be FTP`d. What I would like ideally is a Module that I could pass a filename at runtime, and the Module would run the FTP commands to send the file, without messing about with DOS Batch files. Any...
  12. I

    OnNoData with Reports

    I`ve sussed this now. Try the following, it`s a bit long winded, but it works. In the REPORT (OnNoData event):- ================================= Private Sub Report_NoData(Cancel As Integer) Cancel = True MsgBox "There is no data for this report.", 64, "Information." End Sub On the FORM...
  13. I

    Access locking SQL Server tables.

    Can anyone tell me how to stop Access 2000 locking SQL Server tables when it is querying them ?. I have SQL Server tables attached to an Access DB via ODBC DSN`s. Thanks.
  14. I

    OnNoData with Reports

    Can anyone tell me the best way to cancel the previewing of a report if it has no data in it ?. I have tried DoCmd.CancelEvent, but this produces a "runtime error 2501" and a mesasge saying that "the OpenReport action has been cancelled". Any help greatly appreciated. Thanks.
Back
Top Bottom