Search results

  1. M

    Tricky Upgrade of DB Problem

    How can I overwrite the existing Access database with another Access database without the need for the end user to get involved in the process. I want the code to copy a new mdb file over the database I am using (!) and then automatically start the new mdb file...:banghead:
  2. M

    Check if Modal Form is Top

    Sorted it - just check Screen.ActiveForm.Name to see if it is the same as the first form. Sorry to bother you guys.
  3. M

    Check if Modal Form is Top

    Hi Guys I have a form that is opened as a popup and modal. From this form the user can also open other forms, again which are popup and modal. The first form as a timer event which fires after 5 minutes. It loaded a status screen on this form when the timer event fires. I only want the...
  4. M

    Identify Image Control Name

    Check out this workaround! I have created the following function: - Public Function WhatControl(ByVal MouseX As Single, ByVal MouseY As Single) As Control For i = 0 To Me.Controls.Count - 1 If Me.Controls(i).Left < MouseX And (Me.Controls(i).Left + Me.Controls(i).Width) >...
  5. M

    Identify Image Control Name

    Thanks for your reply, but this is too clunky. I don't want to code each control individually. I want to use a global function, attach it to all of the controls like "=SelectObject()" and then in the function code reference the calling control. Works a treat with any control that can take...
  6. M

    Identify Image Control Name

    Got a right tricky one here. I have a global function which I have hooked onto the onClick event of controls. Currently I am using commandButtons as my control of choice. In my function I can then reference Forms.ActiveControl which is no problem. However, for lots of reasons I really need...
  7. M

    Repeat an Image by Number of Time in Access Report

    I would use the old cross join sql statement. So, have a table which has your image loaded once. This is then displayed in a report in the detail section using an image control. Then have a "temporary" table called "_NumberCopies" which you create in your database with one field. Call it...
  8. M

    Refresh chart data automatically

    The chart object has a requery method. You need to call this method to get the chart to refresh. I have done it previously on the onChange event of a drop down box which listed different date options (e.g. 1 week, 2 weeks, 4 weeks, 3 months). So that when the user selects a different date...
  9. M

    kick out users after a certain time of idle

    I implemented this, but to do it I put code to log out on the timerInterval of the main form of the database. This timerInterval was enabled on the form load and the timerInterval set to 10 second. Every 10 seconds the form would increment a counter which was declared as a global at the top of...
  10. M

    Using a form selection as a query "Field"

    An example for you. At the top of your form you could declare a private constant which would be your SQL statement that you want to modify: - Private Const MySQLStatement = "SELECT SUM(@FieldName) FROM MyTable" The @FieldName is a placeholder for the field that you are going to populate from...
  11. M

    display some results

    Of course mihail is right, but understand that this database lookup functions come with a degree of overhead. So, on your report you could have 6 fields. If each one has a dsum the this will be 6 separate SQL queries. Much better to do the query in one statement if you can.
  12. M

    Why does Why not begin with a Y?

    Well.....?
  13. M

    Is Microsoft Access a 'proper' database?

    Short answer, No. SQL Server is a proper database. But... combine the two and you have a powerful toolkit! There is nothing like Access for serious rad development!
  14. M

    Question excel search

    I would probably try and be clever and link the excel sheet as a linked table. You can do this dynamically through code at runtime (so you can use a different excel spreadsheet everytime). That way you can use Access queries to do the search or even better just insert the row straight into your...
  15. M

    Sum of multiple TIME entries of a table

    I have amended your query1 to show the result. If you put your public function in a module you can access it from queries aswell as forms. Run query 1 and take a look... The code is in GlobalCode.
  16. M

    ADODB CursorType

    This explains all... http://msdn.microsoft.com/en-us/library/office/aa140098(v=office.10).aspx
  17. M

    Problem with Do Until

    You should be doing this in a query really. If you are trying to add missing emp_id into the paymentid table you should do something like this Insert into paymentid (Emp_id) Select emp_id from employeeid where emp_id not in (Select emp_id from paymentid) One statement will insert every...
  18. M

    Sum of multiple TIME entries of a table

    If you post your database I can knock up an example if you like...
  19. M

    Sum of multiple TIME entries of a table

    Not sure I would call this function on the open form. I expected you would have your query connected to a form. So the form displays each record and then in the footer you could Sum your new field. What you can do is add an unbound text box in the footer and then call the function like...
  20. M

    Sum of multiple TIME entries of a table

    So many questions! :-) Short time makes it easier. So in your query you add a column which has something like (cint(format([Downtime],"hh"))*60) + cint(format([Downtime],"n")). Call it TotalMins. In your form you can Sum this field into a field if you like ( as it is a integer). However, I...
Back
Top Bottom