Search results

  1. J

    Deselecting and Highlighting listbox items issue

    Try this in the afterupdate event (ListName being the name of your list control): Private Sub ListName_AfterUpdate() 'Any other processing you need to do after update here Dim ctlSource As Control Dim varCurrentRow As Variant Set ctlSource = Me.ListName For Each...
  2. J

    .requery stops working?

    Am I right in assuming the listbox controls are contained in subforms on your main form? if so you need to change the me. to the full path to your subform. Forms!form_name!Control_name.requery or if you have some vb code on each of your subforms you can use Form_subformname.controlname.requery
  3. J

    Access Word Automation Book marked Text dissapears when printing

    So from what I can see the docs are generating and saving correctly. Have you checked the options in Word?, I know there is one (not sure where in 2003) that updates form fields before printing, if this is checked it may cause the problem you are having. I know in 2007 it is under Print |...
  4. J

    Docmd.transfertext to import data

    You could try: Public Function ExportUsage(strExSpec, strQry, strFileOut As String) DoCmd.TransferText acExportDelim, strExSpec, strQry, strFileOut, No MsgBox "Export Completed!" End Function and pass the values needed when you call the function. Hope this helps.
  5. J

    saving a recordset to a table?

    Pretty sure you will have to toggle through them with what you are doing. Just out of interest are you trying to get a list of current users accessing the DB?
  6. J

    Force users out of DB

    Already have code in place on the main form thats stays open that closes the DB after a period of inactivity, and that also checks a table in the DB to confirm whether or not to close the DB so we can flag the db as needing to be closed. This all works fine. The only problem we are having, and...
  7. J

    saving a recordset to a table?

    assuming you want to append to recordset to an existing table: in example rs1 would be your existing recordset. dim rs2 as dao.recordset set rs2 = currentdb.openrecordset("tbl_Name") 'name of table you want to append records to rs1.movefirst while not rs1.eof rs2.addnew...
  8. J

    Force users out of DB

    Hi all, Problem: there is a database in use at my work that is not a FE/BE db that occasionaly needs updating, used to be ok to do by bringing up a list of users and contacting them to close the DB. Problem is the DB is now being accessed through a wireless network also, when users of the DB on...
  9. J

    Determine if subreport length is over 1 page

    Don't worry, came up with a work around, calculated the maximum number of invoices that could fit on a page then check to make sure no families invoices is greater than that amount, if they are I skip that record in my report and print a list of families whose mailing labels were skipped...
  10. J

    Determine if subreport length is over 1 page

    Hi all, I am setting up a report to print out mailing labels with outstanding invoives printed on the back of the mailing label. I have a main report which has the mailing details for the label and a subreport which prints the outstanding invoices on a second page of the report. ie each family...
  11. J

    Database File Path

    Hi, Not sure if you worked this out or not but the following should work in access97. 'returns the current database file name Dir(CurrentDb.Name) 'Returns the current database path Left(CurrentDb.Name,Len(CurrentDb.Name)-Len(Dir(CurrentDb.Name))) 'Returns the current database path and the...
  12. J

    Database File Path

    Hi, try CurrentProject.Path this will give you the full file path to your current db Cheers
  13. J

    Word Mail Merge Bookmark Problem IF Problem

    Try this out, it should do what you want if isnull(Forms!frmClientDetails!Name) then 'i usually display a message here asking the user to enter the missing data 'then set my controls and objects to nothing and exit the sub else ' i also add code here to check if the bookmark exists in the...
  14. J

    Better Mousetrap with Subform

    Hi I am using ghudson's better mousetrap code in a DB I am working on at the moment and it is working great. What a great piece of code. I have one form in my DB that has a subform. I want to use the mousetrap code in the parent form to stop the user navigating through records with the...
  15. J

    Replace, recordsets and Null values

    Thanks for the suggestion but as it is only part of the field that is being changed I would have to use like "*co-oper*" etc... or I think i would anyway. As I said there are approximately 200 different changes our picky boss wants made to the comments accross the board and it doesn't matter...
  16. J

    Replace, recordsets and Null values

    Hi, Thanks for the quick reply, I had thought about using an update query but there are so many different changes that have to be made to the data it would require alot of queries. (The data is entered by 100 different staff members and all the changes have to be made to suit the current boss'...
  17. J

    Replace, recordsets and Null values

    I am trying to create a DB that fixes some common data problems in a DB created by an app purchased by my employer. I need to check one field of a table and make multiple alterations. I have tried the following code but am getting an improper use of null error when the code is running...
  18. J

    Word document sticks in memory after merge

    Hi andysgirl8800 try changing the end of your code to objWord.Application.Options.PrintBackground = False objWord.PrintOut , , , , , , , , "2,3,4,5,6,7" objWord.Quit False Set objWord = Nothing Exit Sub I tried it doing this at home and it worked the way I think you want. Hope this helps. Jubb.
  19. J

    Word document sticks in memory after merge

    To andysgirl8800 If your still having the same problem post your code on the forum and I will be more than happy to have a look at it for you. You could also download the zip file I have attached and have a look at how I do access to word transfers. Jubb
  20. J

    Word document sticks in memory after merge

    Glad to hear you figured it out. Sorry about the delay in replying to your post about the printing problem, just been very busy. Just posting a db here that you may be interested in for doing Access to Word transfers of text, it works for both 1:1 and 1:Many relationships. Thought you may...
Top Bottom