Recent content by marvo

  1. M

    Importing data to tables using IDs

    SOLVED Thank you. All your ideas gave me inspiration. A very elegant solution in the end that I'm really happy with. Imported the csv into a Temptable that included fields for all the values and all the IDs - even though IDs did not exist in the csv Built a query that joined this Temptable...
  2. M

    Importing data to tables using IDs

    Hi I have a .csv file to import - it's correctly formatted and contains all the data VALUES I need. However, like a good boy, I have designed my access tables IDs - primary/foreign keys to other tables. So for example, I have a database that manages sports fixtures I want to import a csv of all...
  3. M

    Looping Recordset - won't process last record

    Yep - concatrelated..that's the routine I was trying to write! All Working !! xxx
  4. M

    Looping Recordset - won't process last record

    Ok, I got the looping working, thanks MajP, but now, instead of debug print I want to edit another table with the final out put ( All umpires) for each fixture. Can you do an 'edit record set WHERE fixture ID = n'
  5. M

    Looping Recordset - won't process last record

    there is only one fixture ID per game, but multiple umpires from a subform I want to concatenate all umpires related to a fixture and show in a single row, and update the fixture record in a 'all umpires field,'
  6. M

    Looping Recordset - won't process last record

    with some minor tweaks, this code runs nicely - but has same probelm as my original - the last record in recordset never get output before End
  7. M

    Looping Recordset - won't process last record

    i'll try those thanks The umpire="" - yes it does look odd, but its just resetting the string between groups of records - I intend to put some action before that - I had a debug.print just before it, and all working fine. Just trying to get the looping right, before moving on to building the...
  8. M

    Looping Recordset - won't process last record

    Hi all Having trouble with processing the last record in a recordset. I have a nested loop. The code is working great - until the last row in the recordset. As far I can tell, what is happening, is that I have 'MoveNext', which eventually gets to the last row in the recordset, and then loops...
  9. M

    use a variable for the field name in an INSERT INTO statement

    Solved. Plogs observations about quote marks prove to be the key - that is how you get the correct syntax to recognise the variable name: Code Tags Added by UG Please use Code Tags when posting VBA Code Please feel free to Remove this Comment...
  10. M

    use a variable for the field name in an INSERT INTO statement

    :banghead:Didn't know you could do that! newbie error! Sorry!
  11. M

    use a variable for the field name in an INSERT INTO statement

    Hi Plog I was hoping to avoid the 'normalisation' question. My DB is correctly structured, and I'm not generally storing data this way. It's part of a larger problem - For context, I have a DB recording hockey match details and the umpires. tblFixtures - holds main info like FixtureID...
  12. M

    use a variable for the field name in an INSERT INTO statement

    I have the following simplified sample code just to test the theory, before I write the full routine, but it should demonstrate the point. It should insert the value "John Smith" into the field UmpireName1 in the table mergerecords. However, I keep getting the error message that 'Umpire' is...
  13. M

    use a variable for the field name in an INSERT INTO statement

    Thanks for any ideas on how to use a variable for the field name in an INSERT INTO statement! I want to have SQL INSERT INTO tablename, variablefieldname I have declared a variable and assigned a value, but the code just considers the variable name to be a literal field name. Must be some...
  14. M

    'merging'/'grouping' records in a query

    Yescv I've considered the concatenate and then spilt/parse approach... It's one of a few options on a list to try! Currently trying to write VBA to step through the record set and for each umpire name it finds with the same fixtureID, do a SQL insert into a 'merged record' table. The first...
  15. M

    'merging'/'grouping' records in a query

    Hi Minty I'm abandoning the ConcatRelated method. It's been an interesting exercise and I've learned something, but it's not going to give me the result I need. The crosstab I investigated, but I can only get the umpire names as column headings, not as values in the table, which requires a...
Top Bottom