Search results

  1. J

    Creating Listbox into "search form" that generates query - see code - almost there

    Re: Creating Listbox into "search form" that generates query - see code - almost ther the line: strCriteria = Left(strCriteria, Len(strCriteria) - 5) comes after the For...Next loop
  2. J

    DCount Control Update or Focus

    Hmmm - that's certainly unusual Without Access at hand (I'm on a Mac right now), I'm at a loss as to what the hang-up is. Hopefully someone will jump in here, but in any case I can test it out tomorrow (later today) and get back to you Cheers, John
  3. J

    DCount Control Update or Focus

    my bad - must be getting a bit too late for me :D You're right - the On Current is for the Form property Keep the code there, but change it to Me!cmd_TotalAsset.Requery
  4. J

    DCount Control Update or Focus

    No worries. My suggestion may be overkill for the issue you're having, but I don't have a version of Access handy at the moment. In Design View if you select cmd_TotalAsset, you should see the properties menu. The middle tab on the menu should have a list of events. Go to the OnCurrent event...
  5. J

    Object or Class does not support the set of events error

    saying that you may have "probable db corruption" doesn't really address anything of substance, but given the possibility, you'd want to take appropriate steps before it might get out-of-hand (i.e., start with a blank db and move the objects piecemeal from your existing db into the new container)
  6. J

    DCount Control Update or Focus

    In Form_Current event try: Me!myControl.Recalc
  7. J

    Creating Listbox into "search form" that generates query - see code - almost there

    Re: Creating Listbox into "search form" that generates query - see code - almost ther Does this work?: strCriteria = strCriteria & "((Master.ValueTypes) Like '*" _ & Me!mslbValueTypesQry.ItemData(varItem) & "*') AND " Then as final modification:' Remove the trailing AND from the string...
  8. J

    IF Statement- If only it would work both ways!

    NP - hope you get your project working how you need :)
  9. J

    IF Statement- If only it would work both ways!

    Requery is a powerful little method (like pressing the nuclear launch button). If you absolutely need to use it, then it would take some way of backtracking to return the cursor to the *current* record, such as saving a key value from the record, then doing a Find on it after the Requery...
  10. J

    IF Statement- If only it would work both ways!

    If you set stop points, and you mouse-over the Me.DateReferredtoAuditor (or alternatively, use Debug.Print Me.DateReferredtoAuditor) what value does it return after you've deleted the value from it? Ok - nevermind. Sounds like you have it solved!
  11. J

    Dlookup to find duplicates of two fields

    Yes, I understand your controls are unbound, but nevertheless the list for your combo box has a BoundColumn property. If you only have 1 column of data, as you say, then the BoundColumn property would be set to 0. As long as the values in that 1 column are equal to the values for your "Type"...
  12. J

    IF Statement- If only it would work both ways!

    Have you tried testing with the IsNull() function in place of ZLS? i.e., If Not IsNull(Me.DateReferredtoAuditor) And Me.AuditStatusID = 1 Then ... etc.,
  13. J

    Dlookup to find duplicates of two fields

    What is the RowSource for your cborefno control? Are you using more than 1 column for it and is the bound column different than the actual text (i.e., "W239") column?
  14. J

    Array problem

    Good question - In fact, using recordset is overkill and potentially adds an unwarranted amount of 'overhead' (although it would be interesting to test what performance impact it actually has) To bypass the recordset, and go straight to structure look up the TableDef object. Cheers, John
  15. J

    Dlookup to find duplicates of two fields

    What error are you getting? Or what incorrect result is it giving you? Where is the function getting called from?
  16. J

    Array problem

    It's been awhile since I've wrestled with arrays, but I believe with an empty array, it simply assumes myArray(0) - meaning only 1 value can be stored in it. Unless and until you ReDim, you can't be attempting to assign any further values to the array. So, I would recommend: Dim FieldNames()...
  17. J

    Dlookup to find duplicates of two fields

    Boyd, as expected, your response is the quick, thorough and correct one! :D Cheers, John
  18. J

    Dlookup to find duplicates of two fields

    Try:previousRecordID = DLookup("Dummy", "tbl_main", "type = """ _ & Forms!frm_entry!cbotype _ & """ AND (refNo = """ & Forms!frm_entry!cborefNo _ & """ OR refNo = """ & Forms!frm_entry!txtrefNo _ & """)")(Note: I'm using the underscore "_" only as...
  19. J

    Query Most Recent

    Hi Sue, You're welcome, I'm glad that worked out for you :) As for a favorite/suggested resource, these forums aren't bad for picking up tips and methods (as you've probably noticed even in this thread). For actual syntax reference and occasional examples, the library at the MSDN site is...
  20. J

    Query Most Recent

    Hi Sue, By the sound of it, I'd say you need "the most recent" tare weight available for a given truck and harvest date (correct me if I'm wrong) - provided the associated tare weight date is less than or equal to (<=) the harvest date. Based on that, this would be my attempt to "marry up" the...
Back
Top Bottom