Search results

  1. H

    Write to a txt file when the forms loads

    I've found a solution: I had to use OpenTextFile and ForAppending, not the number 3.(ref.http://msdn.microsoft.com/en-us/library/aa265347(v=vs.60).aspx) Private Sub Form_Load() Dim fs, textfile Set fs = CreateObject("Scripting.FileSystemObject") Set textfile =...
  2. H

    How do i delete specific records in a table

    Just use a sqlquery, something like: sqlquery = "DELETE * FROM table where etc etc" CurrentDb.Execute sqlquery, dbFailOnError
  3. H

    Write to a txt file when the forms loads

    I want to write a line to a textfile every time the form loads. Private Sub Form_Load() Dim fs, textfile Set fs = CreateObject("Scripting.FileSystemObject") Set textfile = fs.CreateTextFile("c:\test\test.txt", True) textfile.WriteLine ("The program started: " & Now() & vbCrLf) End Sub The...
  4. H

    Update and delete recordset in a loop

    Thanks you very much for help. I found a problem with that solution in testing. When the sourcetable (scale1) gets new weights, then the field which contains the results are not correct. Some suggestions? There will be new weights all the time in scale1 table. The code has to be executed with...
  5. H

    Update and delete recordset in a loop

    For example in the sourcetable: id weight 1 1000 2 1000 3 1000 loop thru the records and make a running sum: 1000+1000+1000=3000 and delete record id 1-3 after use. If the sourcetable has got new weights: id weight 4 1000 5 1000 Do a running sum again...
  6. H

    Update and delete recordset in a loop

    Ok, I want to take out data from one table and use a loop to go record by record and do a running sum on all weights. Then I want to copy the results in another table and in the same time, delete the records that I have copied from the source table (to save space). In the end I will present the...
  7. H

    Update and delete recordset in a loop

    I have a database linked to another and the task is to sum each record from scale1, delete current record (after calc sum) and put it into another table in another database. How can I ensure that each record sum, record for record and delete it afterwords? Option Compare Database Private Sub...
  8. H

    Query for a resultlist (ranks)

    Yes! Thanks:)
  9. H

    Query for a resultlist (ranks)

    I have a list with weights and would like to rank them as 1,2,3,4,5, highest weight to lowest, with highest on the top of the page. If some of these weights are equal I need to check with another field called "How many?" which field are largest and rank them as shown: Rank Weights How...
  10. H

    Running sum with changing colors?

    Thank you very much:) I used =Count([Fieldname] instead:)
  11. H

    Running sum with changing colors?

    I have now a label with =1 in it, and running sum "All". So the report print out: 1 2 3 4 5 6 7 and so on. How can I count this records and put it in a variable? I want to calculate 25% of the record and set a red color to them.
  12. H

    Question How to import a html with tables and images with vba

    Ok, thanks for help! I think I have to do this the hard way, we will see.
  13. H

    Question How to import a html with tables and images with vba

    Ok, but is it possible with docmd.transfertext and code the whole thing? And what about the url to the image?
  14. H

    Question How to import a html with tables and images with vba

    I know of the import, but I need to do this automatically with code.(VBA)
  15. H

    Question How to import a html with tables and images with vba

    I am using access 2007. An example html file under: <HTML> <img src="picture1.png" alt="Picture1"> <img src="picture2.png" alt="Picture2"> <table border=1> <tbody> <tr> <th>Title</th> <th>Director</th> </tr> <tr> <td>Excalibur</td> <td>Boorman</td> </tr> <tr> <td>Star Wars</td> <td>Lucas</td>...
  16. H

    Question How to import a html with tables and images with vba

    Yes, thats ok. But do you have some suggestions to do that?
  17. H

    Question How to import a html with tables and images with vba

    I want to import a html file with tables and images into my database. Then I want to copy some of the tables and images into a report. Do someone have some suggestions?:) I can use docmd.transfertext maybe, but what about the images? How can I structure the html file in the tables?
  18. H

    Combining queries

    The query show only the team nr 3 and not the other team members. I want to show all the athletes in the competition who also are on a team. Hard one...:)
  19. H

    Combining queries

    Teamname | Competition | SumWeightTeam Team 1 Lake 1 80 Team 3 Lake 1 60 Team 4 Lake 1 45 Teamname | Competition | Athletes.Name | SumAthletesWeight Team 1 Lake 1...
  20. H

    Combining queries

    Thats ok, I understand that. I think I am not so good to explain what I need to do, but I try one more time from the start. I have one table Deltagere (Athletes) and one table Konkurranse (Competitions). One athlete can be a member of a team or not. It is a individual competition and a team...
Back
Top Bottom