Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. sda7bobp

    Checking to see if Form is open

    Thank you, Roy. I knew I had seen it, but just could not locate it or think of it. Bob
  2. sda7bobp

    Checking to see if Form is open

    I should know this, but having a brain skip: How can I check in code to see if a form is open? Thanks, Bob
  3. sda7bobp

    Problem with running mail merge from Access

    I have an Access database from which I would like to print a MailMerge. The code I am using runs on a click event from a form in Access. It launche Word, opens the template into which the data is merged, and sucessfully completes the merge. The problem comes when I attempt to print the merged...
  4. sda7bobp

    Can't open database

    Play with the macrorecorder when doing that. I'm sorry, I don't understand what you are asking me to do. Should I just eliminate the code that doesn't seem to work and complete the merge and printing manually? Or are you suggesting a macro from within Access to complete the task? Bob
  5. sda7bobp

    Can't open database

    PH, Word 97 SR2 What happens when you double-click AccessSurgRpt.dot in an Explorer window ? --It opens to the template without merging the data, as I would expect. It does this through the code also. It gets that far and then the error message comes up. If I try to complete the merge from...
  6. sda7bobp

    Can't open database

    Tom, I removed that line and got the same error 5922 "Word was unable to open the database". Sorry I did not include that in the original post. Bob
  7. sda7bobp

    Can't open database

    Adapting some code I got here last week for another database (in which it is working well) I am having a problem opening an Access database to do a mailmerge in Word. The database that can't be open is the one that is calling the mail merge. Here is the code with the porblem area in red...
  8. sda7bobp

    Controlling Word from Access

    PH and Paul, The code that is presently working and doing very well is: Public Function MergeIt1() Dim odoc As Word.Document, objWord As Object Set objWord = CreateObject("Word.Application") objWord.Visible = True Set odoc = objWord.Documents.Add("C:\Program Files\Microsoft Office\Templates\Lyme...
  9. sda7bobp

    Controlling Word from Access

    Paul, I really thank you for the time you have put into assisting me in this bit of code. In the Reference library I find 3 Microsoft ActiveX Data Objects 2.x Libraries. The program will only allow 1 of those to be checked at a time or it will yield a naming conflict error. They are 2.1...
  10. sda7bobp

    Controlling Word from Access

    I am getting an error "ActiveX component can't create object" Public Function MergeIt() Dim odoc As Word.Document Set odoc = GetObject("C:\Program Files\Microsoft Office\Templates\LymePositive.dot", "Word Document") odoc.MailMerge.OpenDataSource _ Name:="C:\My...
  11. sda7bobp

    Controlling Word from Access

    Ken, I find available references, but from there I am lost. Any help would be appreciated. Bob
  12. sda7bobp

    Controlling Word from Access

    Oh, I'm running Access 97 Bob
  13. sda7bobp

    Controlling Word from Access

    Paul, I get an error with the Dim statement: "User defined type not defined". Public Function MergeIt() Dim odoc As Word.Document Set odoc = GetObject("PathtoyourFormLetter", "Word Document") odoc.MailMerge.OpenDataSource _ Name:="PathTo.mdbFile", _ linktosource: = True, _ connection:="QUERY...
  14. sda7bobp

    Controlling Word from Access

    Thanks, Paul and Tom. I have just gotten back to working on this and will try your suggestions. Bob
  15. sda7bobp

    Controlling Word from Access

    I have never used the Shell function before, so I am not certain just how to get done what I need. I need to open Word from Access, then open a form letter template that gets its data from the Access database from which I am opening Word. Then merge the data and print the letters. I can open...
  16. sda7bobp

    Adding data to a temp table

    I'm really not sure why I have problems with this website, but I don't get all the replies to threads. I had to wait until I got home yesterday to get the last two posts. hkaing79 asked about tblTempInv and the MoveLast. Actually that should have been removed when I used the Update statement...
  17. sda7bobp

    Adding data to a temp table

    It is still not working. I get an error saying the SQL statement is not correct because it lacks a 'SELECT'...or 'UPDATE' Here is the code: Private Sub Yes() Dim db As Database, rst As Recordset, intResponse As Integer Dim lngDrugID As Long, lngCaseNum As Long, datDate As Date Dim sngmgUsed As...
  18. sda7bobp

    Adding data to a temp table

    Thanks, hkaing79, will give it a try. bob
  19. sda7bobp

    Adding data to a temp table

    I have a temp table, tblTempInv with 43 fields. This table is created each morning and inventory is added to it or subtracted from it numerous times each day. I need to be able to make those additions and subtractions in code to increase the security of the numbers, and prevent editing of the...
  20. sda7bobp

    Referring to table names in code

    Slammer, Got it. Thanks for your help! I misread your code at first (read a C for a parenthesis). thanks, thanks, thanks. Bob

Part and Inventory Search

Back
Top