Search results

  1. R

    Test if query contains no records...

    You can test that from any recordset. The form has a recordset... If Me.Form.Recordset.RecordCount >0 then 'records exist else 'no records End if
  2. R

    Set focus to textbox without selecting text...

    However, now that I have posted that... You realize that if you implement this sort of code, then if you return to the field because you realize you left out a word (for instance), every time you type a letter it will go to the end of the text? Can be very frustrating if you have more than just...
  3. R

    Set focus to textbox without selecting text...

    you could also add this line to the end of the code that is running: with me.txtBox .SetFocus .SelStart = len(.Text) End With
  4. R

    What event to refresh subform ???

    Also look at the OnActivate event of the form you want to requery.
  5. R

    Dynamic MultiDimentional Array

    Dimension the array as dynamic: Dim MyArray() as [Type] Then, in your loop, use Redim Preserve and a counter to get your upper bound: dim a as long dim MyArray() as Long a = 0 Do redim preserve MyArray(a) MyArray(a) = a a = a+1 Loop Until a = 100 debug.print Join(MyArray,vbcrlf)
  6. R

    Undocumented Filter?

    Crosstab queries (among other sorts of queries), do not have a Filter property. But create a form with a subform control, and put in the SourceObject Property of the sf-control "Query.MyCTQuery" and you can do a filter-by-form or a filter-on-selection. But, when you have done that, test the...
  7. R

    Open a query with a parameter

    Options If you want to pull it off the form, try Forms!FormA.ControlA The ! operator might be pulling from field rather than the control name. Alternately, if you want to pass a parameter to the query in code, work with the Parameters collection: Dim rs As DAO.Recordset Dim qd as...
Back
Top Bottom