Search results

  1. V

    VBA code for date criteria IfPrivate Sub completed_AfterUpdate()

    That was unexpected! I've added a form error handler, see attached.
  2. V

    Comparing two tables to see if there is any match

    How big are both tables? And are those fields indexed?
  3. V

    Show button on form if value is...

    The correct syntax is: Private Sub Combo7_AfterUpdate() If Me.Combo7.Value = 1 Or Me.Combo7.Value = 2 Then Me.Command21.Visible = True Else Me.Command21.Visible = False End If End Sub
  4. V

    VBA code for date criteria IfPrivate Sub completed_AfterUpdate()

    I can't see how that's related to that code. There must be something else causing the disturbance. Upload a cut-down version of your db (with only the relevant parts and non-confidential test data) and I'll take a look and advice.
  5. V

    Duplicating split forms

    I don't know the engineering behind domain aggregate functions but like you I would expect that they open some sort of recordset too. For example, something like this would run much quicker than the DMax() equivalent: Currentdb.OpenRecordset("SELECT Max(Field) FROM Table WHERE SomeCriteria;"...
  6. V

    VBA code for date criteria IfPrivate Sub completed_AfterUpdate()

    Are you using the code that you were given or are you talking about the code you wrote?
  7. V

    Comparing two tables to see if there is any match

    Well if it's the other way around, swap it around in the SQL. I was going by what you stated in your previous post.
  8. V

    VBA code for date criteria IfPrivate Sub completed_AfterUpdate()

    ECEK, what's the full error message? Your version of "can't save database" doesn't mean much to me.
  9. V

    VBA code for date criteria IfPrivate Sub completed_AfterUpdate()

    Hello Rain, Yeah I did give it some thought. That's why it sets the Cancel parameter to False so it nullifies an attempt to update the checkbox, otherwise it sets the value of the comp_date field (which doesn't cause the Before/After Update events to fire). So in principle it should work as...
  10. V

    VBA code for date criteria IfPrivate Sub completed_AfterUpdate()

    Can you please indicate the full error message and what code line it stops.
  11. V

    VBA code for date criteria IfPrivate Sub completed_AfterUpdate()

    Did you see my post #8?
  12. V

    Runtime error on changing selection

    The runtime error you're getting is as a result of a lack of error handling and this happens in a compiled version of Access (i.e. mde or accde) and (I believe) in a runtime version too (i.e. accde). Like spikepl mentioned, run the code (as an accdb) and when it errors tell us which line it...
  13. V

    VBA code for date criteria IfPrivate Sub completed_AfterUpdate()

    Although the point about it being a continuous form wasn't mentioned in this thread, I got to know about it on one of ECEK's other active thread. :)
  14. V

    Duplicating split forms

    Understood! And some good advice too. But what I'm comparing domain aggregate functions to is other methods of retrieving the same value e.g. via a Recordset. I've shown several methods in past threads which return values much much quicker than domain aggregate functions and I'm sure that you're...
  15. V

    VBA code for date criteria IfPrivate Sub completed_AfterUpdate()

    @AlexN: This is a continuous form and Conditional Formatting is not possible with a checkbox. @ECEK: In the Before Update event of completed If Date() < Me.All_Date Then Cancel = True Else Me.Comp_date = Date() End If
  16. V

    what Reference to be added to conncect to MS Access

    If you want to connect directly to the data in an Access db, you can use ODBC or OLE DB connection via an ADODB recordset. Here are the connection strings: https://www.connectionstrings.com/microsoft-access-accdb-odbc-driver/ https://www.connectionstrings.com/access/ Or if you want to be able...
  17. V

    Items_ItemAdd function do not work for Outlook 2013

    You need to change the declaration of the event handler object because it's clashing: Private WithEvents otItems As Outlook.Items And then your sub's signature will be: Private Sub otItems_ItemAdd(ByVal item As Object)
  18. V

    Comparing two tables to see if there is any match

    INNER JOIN AnnutiesTBL On TBLCancellationModes.PolicyNumber LIKE AnnutiesTBL.PolicyNumber & "*"
  19. V

    Items_ItemAdd function do not work for Outlook 2013

    Right. You've actually posted in the wrong forum, this one is for Access VBA. I'm on the move at the moment but if you stick around I'll have a look when I'm on a computer and get back to you.
  20. V

    Visible radio button based on field

    Is there any need of generating today's date via the checkbox when you can already perform the validation using the Date() function?
Back
Top Bottom