Search results

  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...
  16. M

    'merging'/'grouping' records in a query

    OK the new module is now working, saved with a different name - thanks! A number of issues to address now that it runs through: 1 - I haven't got it to work properly yet! - The Fixtures table (holds main fixture info like FixtureID, time, date, place etc) is related to Fixtures/Umpires (which...
  17. M

    'merging'/'grouping' records in a query

    Hi Minty - thanks for the quick and helpful reply! I've had a read through the article (bearing in mind my VBA is not great at all) and looks like this process will indeed concatenate the 2 umpires names at the end of the row: Fixture1, 24/09/18, Mens 1st XI, Home, School pitch, John Smith, Davy...
  18. M

    'merging'/'grouping' records in a query

    Hi My query returns all the details of a hockey match, on a given date e.g. Date, Place, Time, Team, Competition, etc, The hockey club has 10 teams, so for any given date, the query returns 10 rows with the above info. All fine. On the [FixtureDetails] form that is used to enter all this info...
  19. M

    Calendar files

    Hi I have a fairly simple VBA procedure that uses the DoCmd.SendObject process to create an email which includes values pulled from a recordset (that was created by a query) - and it works fine. The email is to tell players and umpires in my hockey club when and where their next game is and the...
  20. M

    going beyond my limits!

    Hi, I'm Marvo I've done a little programming in the distant past and some Access db design before as a hobby or small projects to help out on things at work but I'm really a beginner. My VBA knowledge is very limited, but I have managed to some stuff in VBA by googling and adapting, changing...
Top Bottom