Search results

  1. S

    putting sql into a text box?

    im begining to like this vba lark. i can see that by the end the code window will be a million miles long.
  2. S

    putting sql into a text box?

    thats a great suggestion. i used to have stack loads of queries saved before i learnt how to use vba. i was very scared of it for sometime and racked up a lot of queries, it got pretty messy. i do now prefer to put it straight into vba as the query is right behind what it represents. thanks again
  3. S

    putting sql into a text box?

    you have helped me before with a record set Dim rs As DAO.Recordset On Error GoTo Err_Proc Set rs = CurrentDb.OpenRecordset("ComplexQuerySQL") If rs.RecordCount <> 0 Then Do While Not rs.EOF Me.txtTreatmentTakings= rs.Fields("TreatmentTakingsSum")...
  4. S

    putting sql into a text box?

    i am wanting to put some sql in a text box. im not even sure if this is possible but i want to stay away from DSum as the criteria will get very complex and i think i wont be able to manage it. so i have built a query and got the sql of what i want to do. i thought about vba Me.TextBox=...
  5. S

    calendar in access 2010

    many months since i started this thread. i have actually found what i was looking for. its a microsoft release for calendar control. i have added the form in the attachment. also in the date field/txt box you wish to use this facility you need to put in your main form (calendar as subform)...
  6. S

    form not refreshing

    thanks. it worked a treat. however i have always been looking for a replacement for calendar control. i have found one. the only thing is that i cant get the txt date box to update the diary again!!! i have got the calendar to update the date box but thats it. there must be an event or some...
  7. S

    form not refreshing

    there is not meant to be a click event. the date selector is the built in fuction of access. the little calendar that shows up when you click on a date field/txt box. this fuctionality can be disabled but the default is enabled. edit. sorry its called the date picker. the option is in the...
  8. S

    form not refreshing

    i have had a diary built for me. it displays all the days appointments or any day that you select. i have on the diary a tx box with date. below that i have day selectors and week selectors. these work fine. but if i want to move to the next month i use the date selector that is built in to...
  9. S

    vba window acting on its own

    ah yes. that would make sense. i have a 1000 timer on my opening form. it does go with the timing. thank for that. is there anyway of getting around this apart from closing the form?
  10. S

    vba window acting on its own

    i have made some changes and i think i have change a setting that is becoming very annoying. in the code window if i type Docmd.Runcommand and then put a space after it to continue with the code it will delete the space. if i then continue with Docmd.Runcommand ac it will usually...
  11. S

    DLookup with TRUE

    its now coming up with duplicate on the Exit_Proc:. do i delete the first instance of exit proc. but if i do that will the code jump to that point and miss the second rs. also im guessing that it will happen with the err_proc:. what is the rule on this?
  12. S

    DLookup with TRUE

    hello again. i have tried to repeat the record set but now it is coming up with duplicate , highlighting 'Dim rs As DAO.Recordset' as the culprit. how do i get round it. i know i cant name it something else. is it possible to have to record set loops in the same routine? heres what i have so...
  13. S

    DLookup with TRUE

    no, patronize away. i actually wanted to ask that but did feel silly. the first text i send was all in one line, i think you acutally helped with that aswell. i do prefer it all to be in one line. thats why i like docmd.runsql. its all nice neat and tidy and the next line does something...
  14. S

    DLookup with TRUE

    i now have an unexpected end of statement on the last row "Hi " & rs.Fields("FirstName") & _ ", it has been 10 Months since your last visit to Chrysalis Lytham. You have " & rs.Fields("LoyaltyPointsSum") & _ "and as per our Loyalty Points Policy you Loyalty Points Balance will...
  15. S

    DLookup with TRUE

    sorry i didnt know that that applied here. i thought that the & _ was to indicate that the next line was included. thanks again.
  16. S

    DLookup with TRUE

    compile error. expected end of statement on the rs.Field("FirstName")
  17. S

    DLookup with TRUE

    could you please help me out again. i have tried to follow your lead but it aint working. i am trying to do another record set to send another bunch of texts. On Error GoTo Err_Proc Dim rs As DAO.Recordset Set rs = CurrentDb.OpenRecordset("SELECT...
  18. S

    query totals

    thanks thats great. is it possible to have the sub within the Attempt query. by this i mean to not have to have an additional query. i would like it all to be in one.(dont know if i am explaining this well). i like to put sql in vba behind a form. so i prefer to have it all in one nice tidy...
  19. S

    query totals

    thanks for that. it didnt work but i have uploaded the same database but with an additional query with what the client LoyaltyPoints total should be. i am guessing that they are all wrong. in particular ClientDetailsID 413,414,415 should be £8.38, £11.48, £16.15 respectively. thanks
  20. S

    query totals

    i would like to generate an apend query. the results must include ClientDetailsID Last Of OrderDate LoyaltyPointsSum i have tried this many times but just cant seem to get it. i have included the relevant tables and my query that i have tried. i want a balance of the loyaltypoints a...
Back
Top Bottom