Search results

  1. D

    Limit query to 1 record via VB code

    Error in merge from query Jack, I did as you suggested and removed the Where statement. From the query window, after entering the Form statement in the PatientID criteria, I ran the query and it worked fine. When I attempted to use the Office Links to merge it with a Word document, it asked...
  2. D

    Limit query to 1 record via VB code

    Error "Can't find data source" I changed my code as you suggested. The main problem is that now Word returns a message that it can't find the datasource. I have the entire code setup so it opens the data source first, but when I attempt the merge, it locks on the merge document and debug...
  3. D

    Limit query to 1 record via VB code

    Error
  4. D

    Limit query to 1 record via VB code

    parameter query Jack, I am not sure if I understand what you mean by parameter query. If I set the query up as you said, the query does ask for a id # to be placed in the query box and then the correct record is displayed. What I am attempting to accomplish is have the same thing happen when...
  5. D

    Limit query to 1 record via VB code

    Code assistance Could someone take a look at my code and tell me if you see anything wrong with the syntax? I keep getting an error and Word can't seem to find the data source as it is written. If I remove the Where part of the SQL statement, it works fine (except it then returns all the...
  6. D

    Limit query to 1 record via VB code

    Wrong again! Jack, I was wrong again in the last message. The error is actually "Word is unable to open the datasource." And then I get a debug error on the lines of code I sent you. Dave Here's the entire code: Private Sub Text151_BeforeUpdate(Cancel As Integer) Dim objWord As...
  7. D

    Limit query to 1 record via VB code

    OOOPPPPPSSSSS First of all, let me say "I'm sorry" to all who responded to my cries for help on my db. I got the names of the postees all mixed up!! It was really Rollen who sent me the sample db. I should have directed my questions about the fixed text box to him. I also should have...
  8. D

    Limit query to 1 record via VB code

    Query Problem - still Wayne, Thanks to you and Jack for the assistance. I noted that in your (Wayne's) sample db that the form box with PID is fixed with the number assigned in the query. I was unable to delete or change this. I am not sure how this can work in a situation where the user...
  9. D

    Limit query to 1 record via VB code

    Additional problems Jack, I guess I should have been a plumber!! Ever since I changed my db to reflect the changes you suggested, I have had a variety of problems. The first was with Access asking for the table to base the datasource on (It's based on a query). Now, I receive errors on my...
  10. D

    Limit query to 1 record via VB code

    Jack, Thanks very much for the timely reply. I completed the above changes. When I run the query from the query side, it works fine after I enter the desired PatientID number. I modified my code in the Event for the txt151 box. Now, when I enter a number in the text box of the form, it...
  11. D

    Limit query to 1 record via VB code

    I have posted this question before, but did not find a viable solution to my siuation so I am posting it again in the hopes that someone out there will have an answer. I have a db with a form that is the data entry point for two linked tables. The tables are linked through a primary key of...
Back
Top Bottom