Search results

  1. M

    Is Value in closed workbook

    The inputs wbk has to read the postcode wbk and I doubt it will be possible to do that without fetching it. Is there space on the drive where the input wbk sits to also contain a copy of the postcode wbk? Postcode data changes infrequently so keeping different copies in sync is not going to be...
  2. M

    Getting a total for specific information in a field.

    Do a query on the history table something like Select EmpID, TypeofAction, Count (*) AS cnt from History Group By EmpID, TypeofAction the cnt column will show the number of times Bob has been late etc. In the query builder, right click the grid and choose Totals to use Group By.
  3. M

    Trigger event to update all records on application open

    If you only check when the database is opened, what will happen if status changes during the day? I imagine someone keeping the database open all day so the status won't get refreshed.
  4. M

    VBA 1004 error on second time through loop

    Looks like I wasn't being clear to Excel which object I was talking about. I changed it as follows For Each openStudy In openStudies.keys() firstrow = findValues("first", "" & openStudy & "", rng) lastrow = findValues("last", "" & openStudy & "", rng)...
  5. M

    Ranking And Resetting

    Bit of a guess but have you tried putting an initial value for Temp before line 4 (where it is compared to Count)?
  6. M

    Return records from one table based on date in another

    In the form's date box, have an onUpdate event which refreshes the dropdown. In the query which populates the dropdown, have a Where clause which uses the value from the form =Forms!yourFormname!txtDate You might need to have a default date for the query to fall back on as it will otherwise...
  7. M

    VBA 1004 error on second time through loop

    I need to get rows from Sheet2 and paste them to a series of new sheets. In the first run I might copy rows 2 through 13 from Sheet2 and paste to Sheet3, in the second run copy rows 14 to 29 from Sheet2 and paste to Sheet4 and so on. Does that make sense?
  8. M

    filter form only by clicking button

    You could have a second button to show [Za platiti] = 0 which would be Me!txtYourValue=0 DoCmd.Me!Requery
  9. M

    VBA 1004 error on second time through loop

    This macro is intended to get a range from one sheet and put it on a freshly created sheet, then get the next range and copy to another new sheet. It works correctly first time round, but on the second time at Select it gives a 1004 application- or object-definition error. The debug.print shows...
  10. M

    Returning only values I want

    Can you post the SQL that you have generated in the query builder?
  11. M

    form opens a web page

    This is a guess but the web page script might be expecting you to have arrived from another page on the web site, where the reference was defined. Because you have 'deep linked' direct to the page in your screen shot from the form, the reference did not get defined so get an error message. You...
  12. M

    filter form only by clicking button

    You can add a parameter to the query that refers to the form and use a button on the form to change a value and then refresh the results. In the query: [Za platiti]>=Forms![NameOfYourForm]![txtYourValue] On the form, a text box called txtYourValue, with a default of 0 A button with onClick...
  13. M

    'Like' returning different results in vba vs query builder

    Hi, we've been talking at cross purposes. I opened your sample db and it contained 2 queries which together demonstrate that ' and " are equivalent, but to really recreate my problem you would need to have recreated the VBA stuff as well. I had run my query in the query builder, and then took...
  14. M

    'Like' returning different results in vba vs query builder

    Hi Paul, sorry, should have posted this before Dim rsLog As DAO.Recordset I did try % on the offchance but that didn't work.
  15. M

    'Like' returning different results in vba vs query builder

    I think the issue is to do with the DAO I used in VBA, rather than just the text delimiter. Your examples were both directly in the Access query interface and they worked for me too.
  16. M

    Date/Time default value, can it be an expression?

    I think you can put VBA in the form's OnLoad event that says If me.newrecord then mydatefield=Date() end if
  17. M

    'Like' returning different results in vba vs query builder

    Hi plog, This is from debug.print strSQL SELECT Log.ID, Log.Nature FROM Log WHERE (((Log.ID)='123') AND ((Log.Nature) Like '*Visit*')) It returns all 3 rows matching 123 although only one of them has the string Visit in the Nature field. The only things I can see are swapping " to ', and the...
  18. M

    Code for opening new form and taking data from another

    Are you allowed to modify the first form? If so, you might like to have a sub-form within it showing the history, without any button clicking. Design a very simple form based on the ClientHistory table and add it as a sub-form to the first form. At this point you should be prompted for the...
  19. M

    'Like' returning different results in vba vs query builder

    This query in the builder returns one row as expected SELECT Log.ID, Log.Nature FROM Log WHERE (((Log.ID)="123") AND ((Log.Nature) Like "*Visit*")); But this in vba returns rows where Log.Nature does not include the string 'Visit' strSQL= "SELECT Log.ID, Log.Nature" & _ " FROM Log WHERE...
  20. M

    backup

    Could you just dodge this problem? I would think that someone who is expected to run the backup process should have enough confidence and technical knowledge to just use the features in the Access Tools menu.
Back
Top Bottom