Search results

  1. B

    Copying Records - Better Way

    What about this approach? It creates a 'source' recordset containing the record to be copied with the ID field. It then creates another blank 'destination' record set. Loops over the source recordset field names and adds them to to the blank recordset (minus ID). It then loops over the record...
  2. B

    Copying Records - Better Way

    Hello my fellow Antipodean, I don't think that is an option - data comes into those tables from a variety of external places (not just this copy query) so it needs to keep track of its own records. Cheers Al
  3. B

    Copying Records - Better Way

    Hello, I have been battling this for a few days now, and there has to be a better way. I want a button on a form to copy a record from Table 1 DB1 to Table2 DB2. The tables structure is identical. There is a Auto Primary Key ID on both Table1 and 2. Both Table 1 and 2 have a large number of...
  4. B

    Transfer to another DB

    Hi, I dont think that will work as ID is a auto generated primary key and if I copy it across there could be key conflicts. I need to copy without the key. Al
  5. B

    Transfer to another DB

    Ok - to avoid trying to insert the record into the new table with a primary key I am: 1. Checking record doesnt already exist in target table (SAMNT) 2. Getting the field names and values into strings (minus the Primary key ID) 3. How to get the values into a SQL string in a SQL safe syntax (ie...
  6. B

    Transfer to another DB

    I suppose I can now that I am not trying to open a file. However the more interesting issue the button transfers a record from one table to another with identical fields. I think I will run into issues if I try SELECT * (because this will include primary key) and when I try to insert primary...
  7. B

    Transfer to another DB

    Connection string was messed up. rsc.Open strSQL, conn, 0, 1 Works.
  8. B

    Transfer to another DB

    I think I am getting closer but still getting a error: Error 3709 The connection can not be used to perform this operation. It is either closed or invalid in this context. On line: rsc.Open strSQL This is the current code: Private Sub btn_transfer_Click() On Error GoTo Err_Transfer Dim ws...
  9. B

    Transfer to another DB

    What if both databases have a table of the same name? In the SQL how would you distingush one table from the other? Update: When I linked the tables with the same name, the second instance got a "1" on the end
  10. B

    Transfer to another DB

    Hiya People, I am trying to check if a record exists before an INSERT statement. Easy enough on the same database and I see a few answers already here, but what if you want to chek if the record exists in a seperate database? I tried something like: Private Sub btn_transfer_Click() On Error...
  11. B

    Combobox Search Form with Calculated Field

    Yes, I got that to go now too. By the way I confused you because I obfuscated my code in a way I shouldnt have. Its testing to see if at the time of date start the person was under 6. Date() is actually a DOB field :-) Thanks again Al
  12. B

    Combobox Search Form with Calculated Field

    Thanks Steve, I thought the IIF might be a winner but I only got False (before I was getting 0 and -1) I am happy to use VBA but not sure what event to use. Any ideas? Al
  13. B

    Combobox Search Form with Calculated Field

    Hi, I have a main form with a subform for a search functionality using combobox lookup. The combo boxes on the main form control which is displayed on the subform (datasheet). One of the colums on the datasheet is set to be a calculated field based on an expression that looks like: =Date...
  14. B

    Invalid Procedure Call

    I actually wonder if its to do with empty fields. for example if all the childs dates of births are empty then: Child1DOB between today and today-5 years is fine because it returns false. But if try: NOT Child1DOB between today and today -5 years I want it to return true (even though there...
  15. B

    Give me speed!

    Will have to check size. Do you store them in a related table?
  16. B

    Give me speed!

    Yes, in essence it is largely not normalised.
  17. B

    Give me speed!

    It could also be worth mentioning that one of the fields is a Memo Field and stores largish volumes of text (about a page's worth).
  18. B

    Give me speed!

    Thanks for that. A little more information: The database is split (is that different to normalised?) and each user access it via a front end on there respective PC's. The backend is on the server. Its got progressively slower as time has gone on,and compact repair helps for only a matter of a...
  19. B

    Invalid Procedure Call

    Hello, Why is it that this query is OK: SELECT * FROM DATABASE WHERE ( Child1DOB Between DateStart And DateAdd("yyyy",-6,DateStart) OR Child2DOB Between DateStart And DateAdd("yyyy",-6,DateStart) OR Child3DOB Between DateStart And DateAdd("yyyy",-6,DateStart) OR Child4DOB Between DateStart And...
  20. B

    Give me speed!

    Sorry for the belated reply on this one. The computers are Corei5 8Gb Ram, Fast Ethernet with Cat5.
Back
Top Bottom