Search results

  1. T

    Timed Event Database

    Hi Just quickly, i think you will need. To identify the function you are evaluating (column for that). The rest is just maths. You need to identify the time the machine is on. Total on = Elapsed time - (time off1 - time on1)+(time off2 - time on 2) etc test time = Test ended 1 - test started 1...
  2. T

    Run time error 9 subscript out of range

    What about: Debug.Print rs!Method ? T
  3. T

    Demurrage Calculation using a sliding scale

    Hi Again I would write a function for this... You can use a User Defined function in a query. The parameters for the function would be date first arrived on site and reporting calendar month/year and perhaps if valid the date the demurrage ended. The costs would be constants in the function -...
  4. T

    Pass a filter criteria to a query that include both wildcard and Null

    Good luck.. We all had to start somewhere and I am still learning. There are always more than one way to do things. Its finding what's best. :) T
  5. T

    automatically insert data to another table by completing checkboxes

    This is how I would do it... Private Sub Basic_Inspection_Click() CheckCompletion End sub Private Sub Certifying_Staff _Click() CheckCompletion End sub ..etc Sub CheckCompletion () ' or function... Dim blnComplete As Boolean blnComplete = False if me.basic_inspection = true...
  6. T

    Demurrage Calculation using a sliding scale

    Very true Dave.. AND easier to read/follow :)
  7. T

    Pass a filter criteria to a query that include both wildcard and Null

    Hi Again Re-reading your original post, I don't know what you are using your query for.. You can dynamically change a static query. But what are you using the query for? If your using it for a record source you can use the .RecordSouce = mySQL driven by the After update event on the combo box...
  8. T

    Access 2010 - Can Subforms be linked together?

    Hi Just a quick response as I should be somewhere else :) Agreed with vbaInet as Approved & Declined should be mutually exclusive. Also, if you are referring to a subform or another sub form then the syntax changes. You need to refer to the parent form and then the subform container etc.. Look...
  9. T

    automatically insert data to another table by completing checkboxes

    HI your checkcompletion function IMHO is flawed. I dont think its good to concatenate all the conditions to look for a string of 1's I would loop through the checkboxes and if anyone of them is false the result is false. If all true then the result is true. Also I would also check if the...
  10. T

    Pre-populating a subform with parent data

    If Items is your foreign key, then I would have thought this would populate itself when you enter information in the personnel or date allocated fields :confused: T
  11. T

    Demurrage Calculation using a sliding scale

    Hi I have had a quick look. In your qryDemurrageCalcDetails you need to take ElapesedDays minus LowerRange as your demurrage time for each range. you THEN need to sum the totals of each range for each container. (Ignore any minuses) HTH Tim
  12. T

    Pass a filter criteria to a query that include both wildcard and Null

    Hi This is how I would construct the SQL If Not IsNullOrBlank(Me.txtFrom) Then strWhere = strWhere & "tblXYZ.StartDateTime># " & Me.txtFrom & "# AND " End If If Not IsNullOrBlank(Me.txtTo) Then strWhere = strWhere & "XYZ.EndDateTime<# " & Me.txtTo & "# AND "...
  13. T

    Code for Outlookworked now it doesn't ?!?!

    Hi It looks similar to code I have. I have used .display instead of .send.... However, if you put some error handling in so that the objects are set to nothing after an error, this may help... (or may not - I'm guessing) HTH T
  14. T

    Bill Of Materials

    Hi I deal with BOMs and this is how I handle them..... Basically a BOM can contain other BOMs and a recursive method is required..i.e. calls itself. This method enters data into a temp table that contains a parent material and its children Sub BOMMethod(rst As DAO.Recordset, strAssembly As...
  15. T

    VBA date range problem

    Hi All I use an Allen Browne function. SQLDATE Works for me...http://allenbrowne.com/ser-36.html
  16. T

    Error number 2926 (Security settings)

    I have clicked "Allow trusted location on my network". I also tried to run the database of my desktop. I am currently thinking that I should redesign my UI to be without a scroll bar and replace it with buttons. The code is entirely within my Access application and does not affect anything...
  17. T

    Error number 2926 (Security settings)

    I have recently been told of an error with one of my databases. The error number is 2926. The description is "Because of your security settings and current security policy, this control is disabled. To modify your policy and enable the database, use the Message Bar". On investigation, my copy of...
  18. T

    Use Value on form control as default value in other tables

    Hi I am not entirely sure what you are trying to achieve. But could you use a global variable? Also you could copy the form object into a module to copy attributes. You could set the default value of the second from depending on the values in the first form.... I hope this helps..if not..if...
  19. T

    Automatic mail to be triggered from Access

    :)Here is more detail on how I get the text into the email. However, I guess your situation will be different and you may need to create a recordset and then loop though it.. Private Sub cmdEmail_Click() Rem...
  20. T

    Setting control property with VBA stopped working

    I am not sure on what you are trying to do. But if you are locking controls using VBA then you will not see this in the properties of the form. If you run the form & the VBA you should be able to see if the controls are locked. The properties box shows the state of the form when it is first...
Top Bottom