Search results

  1. Sam Summers

    Solved Code wont run correctly unless stepping through with breakpoints?

    So recorded hours is an hour gauge. So yes genset is 12 + 237 as you said. Most components would be used when a vessel is used but not always so it is the user who must log the hours after each use of whichever component (or all) that are used. ServiceHour is what i am trying to increase by...
  2. Sam Summers

    Solved Code wont run correctly unless stepping through with breakpoints?

    Hi again and thank you. The components that are filled in just now is only me testing the code. When the users first populate the system they will enter the service intervals for each component depending on the components for each vessel. Each vessel has different components. The Recorded...
  3. Sam Summers

    Solved Code wont run correctly unless stepping through with breakpoints?

    Thank you for your reply. sorry for the confusion. I shall explain - You will see that there are a few vessels and some have different components than the others. The user sets the service interval on entry of the components for each vessel so the service intervals will vary but you are...
  4. Sam Summers

    Solved Code wont run correctly unless stepping through with breakpoints?

    So i have tried things OnCurrent and OnLoad and various things as you will see in the attached DB its all in the 'ViewServiceHistory' form which normally opens from the 'Service' Tab on the 'ViewVessel' form. You will need to use the bypass key to open it.
  5. Sam Summers

    Solved Code wont run correctly unless stepping through with breakpoints?

    Well unfortunately nothing works now so i think i have to scrap the whole thing
  6. Sam Summers

    Solved Code wont run correctly unless stepping through with breakpoints?

    I found out why 'ServiceHour' produces a type mismatch!! Its because i have the Control Source set to "=[Divider]*[ServiceInterval]" which is to ensure that the service interval is updated once each service interval has been passed So i need to find another way of doing this?
  7. Sam Summers

    Solved Code wont run correctly unless stepping through with breakpoints?

    Hi Guys, another week of trying to fix this! I tried the decompile option of the Doc Man's but still no luck. I found the original error where for some reason the ServiceHour field was set to Date/Time but even after changing it back and starting again the code is still not recognising it at...
  8. Sam Summers

    Solved Code wont run correctly unless stepping through with breakpoints?

    So after finding the mismatch, this is working best now but still only stepping through breakpoints? I think i have to do what Doc Man said and get back to you. Fantastic help everyone!! 10 If Not (Me.TotalHours & "") = "" And Not (Me.ServiceInterval & "") = "" Then 20 If Me.TotalHours <...
  9. Sam Summers

    Solved Code wont run correctly unless stepping through with breakpoints?

    Yes all the others seem to work but i may have found the mismatch
  10. Sam Summers

    Solved Code wont run correctly unless stepping through with breakpoints?

    Yes it just threw an error again at nz(Me.ServiceHour,0)
  11. Sam Summers

    Solved Code wont run correctly unless stepping through with breakpoints?

    Right at the moment using MajP's earlier code i am getting a "Type mismatch" error on line 60 10 If Not (Me.TotalHours & "") = "" And Not (Me.ServiceInterval & "") = "" Then 20 If Me.TotalHours < Me.ServiceInterval Then 30 Me.DueIn.Value = Me.ServiceInterval - Me.TotalHours 40 Else 50...
  12. Sam Summers

    Solved Code wont run correctly unless stepping through with breakpoints?

    Amazing guys! Let me just check it all works and i will get straight back to you!
  13. Sam Summers

    Solved Code wont run correctly unless stepping through with breakpoints?

    Well if i knew how to do that i would? Its taken me over a week to get my head round what i have now and as i said it works perfectly when i step through it but not otherwise and i dont understand why?
  14. Sam Summers

    Solved Code wont run correctly unless stepping through with breakpoints?

    Hi Guys, This code works as long as i set breakpoints and step through it but if i just open the form and try it does not initialise variable 'a' I must be missing something because it works perfectly otherwise? Many thanks in advance. Private Sub Form_Load() Dim a As Integer Dim b As...
  15. Sam Summers

    Solved Creating four textboxes with different colours relating to a lookup table fields

    Ha Ha, no it was when i was in the Sahara
  16. Sam Summers

    Solved Creating four textboxes with different colours relating to a lookup table fields

    Hi All of you and thank you Pat too. I went with Arnels method as the user has to see the colour to select the current colour where the period (6 months usually) may vary at each end of its implementation. So all i used was the colours with no fixed periods. Thank you all again for your help as...
  17. Sam Summers

    Solved Creating four textboxes with different colours relating to a lookup table fields

    Hi Mike and Arnel i should be able to create what i want from Arnel's attachment Thank you both very much. I will post when i have solved it
  18. Sam Summers

    Solved Creating four textboxes with different colours relating to a lookup table fields

    Hi Mike, its just stored in the record until the user selects a new colour for the next period
  19. Sam Summers

    Solved Creating four textboxes with different colours relating to a lookup table fields

    Hi everyone, All i am trying to create four boxes on a form, each with a different colour (Green, Blue, Grey and Purple). The user will select the current colour relating to the item which will be the current colour code for the period. I have created a 'Colour' Table but currently do not...
Back
Top Bottom