• WSDottie

    WSDottie

    @wsdottie

    Viewing 13 replies - 46 through 58 (of 58 total)
    Author
    Replies
    • in reply to: Date Query (Acess 2000 SR1) #552454

      Hi James,

      In the criteria for the date field in the query use the Between operator as: Between [FromDate] and [ToDate]

    • in reply to: Dim dbs as Database (2000) #1790040

      I think I read that Access 2000 does not set a reference to the DAO object library by default; but it does set a reference to the ADO library. So if your database was created in Access 2000 you would need to set the reference explicitly; if you already did this, it may have gotten unset somehow; that sometimes happens. Without the DAD library, the compiler will still recognize Recordset because ADO has a recordset object, but it doesn’t have a Database object.

    • in reply to: Open Word doc from vba (Excel 2000/SR2) #551907

      In Excel’s VB Editor, choose Tools –> References, set a reference to Microsoft Word 9.0 Object Library.

    • in reply to: Finding multiply matches for a record (Visual Basic 6.0) #1790034

      You could use the Filter property of the recordset to get the records matching the search criteria; the filtered recordset’s RecordCount property will then give the number of records meeting the criteria. You can use the usual navigation methods, like MoveNext, to let the users move thru the filtered records. When you want to look at the unfiltered original recordset again, just set the Filter property to adFilterNone.

    • in reply to: Problem with SQL? (A2k (9.0.4402) SR-1) #551779

      Oops, sorry. Thanks, Rory.

    • in reply to: Problem with SQL? (A2k (9.0.4402) SR-1) #551760

      Have you tried changing AND to OR?

    • in reply to: GetObject (Word 2000) #551688

      Dale,
      Have you tried including “Word.Document” as the second parameter in the GetObject function in case VBA automation thinks there is more than one app that can open a .doc file? Also, there is a KB article Q163492 that talks about problems with automation getting an object due to delays in Word if it is busy doing something else at the time; not sure if this might be relevant to your problem, but may be worth a look.

    • in reply to: Credit form in front of a report (Access 2002, Win 98 2nd R) #551588

      You can create a criteria form that will have fields for all the parameters needed. So let’s say you need a start date and end date; put those two textboxes on a form frmDateCriteria; add an “OK” button, cmdOK; in cmdOK click event make the form invisible. In the open event of your report, add code to open frmDateCriteria. When users fill in the parameters and click OK, the report will run. In the close event of the report, close the criteria form. You will also want to change the queries behind your subreports to pull values from the form, so instead of [Enter Start Date] in the criteria, use Forms!frmDateCriteria!txtStartDate.

    • in reply to: error caused by too many records (97) #551586

      If there any null values in the field and your criteria expression is trying to perform a string operation, I think that can give a type mismatch. Maybe you could try excluding nulls from the selection. Just suggesting this, because I have been “Nullified” a number of times in Access query expressions.

    • in reply to: Loading documents without templates (Word 2000 (SP2)) #551352

      You can change the attached template as soon as the document opens, do whatever, then restore the original attached templated before closing. Probably the normal.dot is the one with the least references,etc. so maybe temporarily setting the template to normal would do the trick for you:
      strOrigTemplate = ActiveDocument.AttachedTemplate.Fullname
      ActiveDocument.AttachedTemplate =”” ‘setting it to an empty string actually attaches normal.dot
      …. do whatever needs doing
      ActiveDocument.AttachedTemplate = strOrigTemplate ‘restore the original template

    • in reply to: Crashin’ VB Program (VB6(SP5) & Word 2000(SP1)) #551276

      Oops, slight correction to my previous post. I didn’t mean to say that Excel and Word had the same Class ID’s. As the Knowledge Base article explains, it is just a few of the interface identifiers that are duplicated in the old Excel library and Word’s library.

    • in reply to: Crashin’ VB Program (VB6(SP5) & Word 2000(SP1)) #551275

      We had this same problem; the VB program would crash only on a few users’ machines at the point in our code where we invoked Word’s Find method. Found this Knowledge Base article that gave a resolution that worked for us. Q292744 Bug: Automation Client Receives Error or Crashes Calling Word’s Find Object. I turned out that a few users had an old Excel object library that has the same Class ID as Word. The KB article explains how to fix this.

    • in reply to: Compile Error – broken references? (Access97) #551267

      Have any of your Microsoft Office files been moved to different locations recently? We had a similar problem when we were upgraded to Office 2000 and Access97 was moved to a different directory to allow time for conversion efforts. The Access97 projects looked for references in Microsoft OfficeOffice and automatically changed them to the newer versions, so that the reference to Microsoft Access pointed to MSACC9.OLB instead of the required MSACC8.OLB (97 version). MSACC8.OLB is the Object Library that has interfaces that recognize the names ‘currentdb’ and ‘dbengine’ . We also were using Word Automation and since Word 97 had been removed, the reference was automatically changed to MSWORD9.OLB. I have also had the experience that sometimes just unchecking the reference even if it looks to be pointing to the right OLB or DLL location, closing the project, reopening it, and resetting the reference by checking it again fixes these broken references. You might have to reset all the references; when this happened to me I was also getting compile errors on VBA functions even though the VBA library appeared checked in the list. Even if none of your files have been moved, it might be worth a shot to redo references. Good luck!

    Viewing 13 replies - 46 through 58 (of 58 total)