Recent content by rctong

  1. R

    Looping through recordset uses last record to update all records

    WORKS! amazing, thank you for helping push me in the right direction! Private Sub Nearby_Click() Dim postcode1 As String Dim postcode2 As String Dim value As String Dim sHold As String Dim strSQL As String Dim Rst As DAO.Recordset Dim db As DAO.Database Dim qdf As DAO.QueryDef Set db =...
  2. R

    Looping through recordset uses last record to update all records

    1--------- sDistance 133 mi 2------ sDuration 2 hours 40 mins 1 sHold 133 mi|2 hours 40 mins 1--------- sDistance 133 mi 2------ sDuration 2 hours 40 mins 2 sHold 133 mi|2 hours 40 mins 1--------- sDistance 1 ft 2------ sDuration 1 min 3 sHold 1 ft|1 min All the inputs and shold output...
  3. R

    Looping through recordset uses last record to update all records

    jdraw - no change, i stepped through with you lines but it does that same thing. i see where your going with it though. boblarson - sort of but i only what the update to be temporary, i want it to be store until a refresh, form close or the button is clicked again.
  4. R

    Looping through recordset uses last record to update all records

    Had a look at the video and a few other samples and changed the code a bit. Its cleaner and still calculates the time/distance perfectly, however now it only remembers the last record it worked on which is at the end of the query and posts that result in the first records ptemp field :S Private...
  5. R

    Looping through recordset uses last record to update all records

    I do, tried it to death. I have tried so many different ways of doing loops etc. Do you know of any good loop templates that might help??
  6. R

    Looping through recordset uses last record to update all records

    No change, still does the same as before.
  7. R

    Looping through recordset uses last record to update all records

    Hi, thanks jdraw but that part works fine and i have been using it elsewhere. The issue is with the loop not the code to get the distance/time between to postcodes. In fact it displays the correct distance/time but only for the last record in the recordset and it then takes that value and puts...
  8. R

    Looping through recordset uses last record to update all records

    Postcode search is a complex function that takes two values postcode1 and postcode2 and asks google what the distance and time is between these. So if you typed say "sw19 to cf24" into maps.google.co.uk it would give you the same answer. What I am trying to do is loop through each record in the...
  9. R

    Looping through recordset uses last record to update all records

    Hi Guys, I have 5 subforms that run off 5 separate queries that are filtered by the criteria pointing to each day of the week. I have put together the following but it updates the 'ptemp' in each record with the last value it calculated, i.e. the correct value for the last record. Obviously i'm...
  10. R

    dBASE data type mismatch - using CAST?

    Anyone got an idea how to fix a data type mismatch when linking to a dBASE table on a seperate server? Used the following code before when using local Access 2007 tables but the incompatibility with dBASE is preventing access from recognising that data types are both numbers! Private Sub...
Back
Top Bottom