Search results

  1. T

    Main and subform link problem.

    As the attached schema indicates, I'm showing grand-children.
  2. T

    Main and subform link problem.

    Do you mind sharing the code for these forms?
  3. T

    Main and subform link problem.

    Thanks that worked. Just curious why the need to link to the first table on the food chain? What if one is working with a very complex schema where a 'remote' table somewhere down the food chain does not contain a link to the first table, how is that handled. :eek: It will come up sooner or later.
  4. T

    Main and subform link problem.

    Here it is again.
  5. T

    Main and subform link problem.

    As, I mentioned in the original thread, I have done that for the first table in the attached schema. However, I can't link tblSoftDonorInto to the main table since there is no join field in it. The link must be made to tblGiftInto.GiftID (PK) = tblSoftDonorInfl.GiftID (FK). This is the issue the...
  6. T

    Main and subform link problem.

    Hi, I'm having a problem linking main form to a subform. I have already done this when the first table in my schema (attached) is in the main form and the second table in my schema is in the subform. Now, I want to show records that are linked or related to the second table tblGiftInfo.GiftID...
  7. T

    @SQL Formatting problem

    Hi SQL Masters, I'm having a problem with terminating statements in the @sql script section. The problem is only in the section run by the EXEC (@SQL). Can anyone see what I'm doing wrong. USE Temp_Upload_Tables DECLARE @TableCount tinyint DECLARE @SQL varchar(2000) DECLARE @TableName...
  8. T

    Variable in where clause not working

    Hi Minty, I have expanded the previous code and am having a similar problem with terminating statements in the @sql script section. Would you please tell me what, I'm now doing wrong. USE Temp_Upload_Tables DECLARE @TableCount tinyint DECLARE @SQL varchar(2000) DECLARE @TableName...
  9. T

    Variable in where clause not working

    Super that works!
  10. T

    Variable in where clause not working

    Still getting error message: (1 row(s) affected) (1 row(s) affected) (1 row(s) affected) (1 row(s) affected) Msg 207, Level 16, State 1, Line 14 Invalid column name 'EN'. (1 row(s) affected) Msg 207, Level 16, State 1, Line 14 Invalid column name 'EH'. (1 row(s) affected) Msg 207, Level 16...
  11. T

    Variable in where clause not working

    Where is it missing ?
  12. T

    Variable in where clause not working

    I copied straight out of Management studio so it may have retained the color format. As to the code: Select Top 1 @TableName = TableName, @TableID = TableID From #TableList I'm assigning the columns from the first row temp table into two variables. You will notice that, I load the table in...
  13. T

    Variable in where clause not working

    Hi SQL Masters, I have a straight forward SQL code that, I decided to add a variable to the where clause. I have tried writing it many different ways but keep getting an error message. Before, making it into a variable it worked fine but now, I get the error message: (1 row(s) affected) (1...
  14. T

    PasteAppend Functionality

    JHB, I have a follow-up question on this matter. The code that, I used works fine but I ran into a problem by accident. I copied a large block of SQL code and when, I clicked on the button, I pasted in SQL. How can, I validate the data that is in the clip-board and prevent this...
  15. T

    How to block of code recursivly

    Hi All, I came up with the script to run my query for all the tables necessary tested it and worked fine. But, now that I have put all the pieces together, I'm getting an Incorrect syntax near 'Y'. Can anyone see what is wrong? Error msg: Msg 102, Level 15, State 1, Line 37 Incorrect syntax...
  16. T

    How to block of code recursivly

    Basically, the data in the MRN_Processing table is being joined to many other tables to update them. I used a select for testing but the script, I sent will be an update query. The table name in the script is tmpEpic_Name which is one of the tables but there are many others. So, the sp would...
  17. T

    How to block of code recursivly

    Galaxiom, Can you provide a generic code structure?
  18. T

    How to block of code recursivly

    Hi SQL Masters, I have a block of code that work perfectly but need to run it against dozens of tables. It does not make any sense to repeat it. What structure can, I use to run this code and loop through many different tables? See code below. Besides the table name changing, the tbl_id in the...
  19. T

    PasteAppend Functionality

    JHB Thank you for this simple solution. I had two versions of this code and the subform name was different. So, when, I tried your code it did not work the mistake was simple enough to fix but, I was doing several thinks at the same time and missed it. So, it works. Thanks!
  20. T

    PasteAppend Functionality

    The table has two columns data type is nvarchar(25) called import_MRN. The form is called Collect - MRN and has a subform that is bound to the SQL table that is linked to Access DB called MRN. Here is the code on the button that deletes old MRN and adds new ones: Private Sub btnClear_Click()...
Back
Top Bottom