Search results

  1. AOB

    Add Yes/ No to Dialogue - When user clicks Yes delete Record when user clicks no keep

    Great stuff, glad to help, best of luck with it!
  2. AOB

    Add Yes/ No to Dialogue - When user clicks Yes delete Record when user clicks no keep

    Or, alternatively, don't bind the form to a query or table, but instead use your own validation code and controls to check the quality of the entered information before updating it or appending it to your table(s). That way no record is actually created or updated until the form is completed and...
  3. AOB

    Add Yes/ No to Dialogue - When user clicks Yes delete Record when user clicks no keep

    This might get you started?... Private Sub Module_Code_AfterUpdate() Dim strCriteria As String strCriteria = "Module_Code=" & Chr(34) & Me.Module_Code & Chr(34) & " AND Course=" & Chr(34) & Me.Course & Chr(34) If DCount("Module_Code", "tbl Stages", strCriteria) > 0 Then...
  4. AOB

    Need some help making a bad query good (AC2007)

    Phew!! Thanks for clarifying! I was off clicking my heels and treating myself to an extra shot in my morning coffee to celebrate before I noticed your post and started to feel blood draining! Thank you very much for all your efforts and suggestions, I appreciate it all!
  5. AOB

    Need some help making a bad query good (AC2007)

    No that's fine, thanks jdraw - it may be 8 years, but your familiarity with SQL is still considerably stronger than mine! I noticed you've removed this comment from your last post? Should I be concerned?... :eek:
  6. AOB

    Need some help making a bad query good (AC2007)

    Thanks jdraw! I figured as much but just wanted to clarify. While my solution is sufficient - it produces the desired dataset within an acceptable timeframe - the one bit that bugs me slightly are the similarities of the sub-queries either side of the UNION ("A" and "C", "B" and "D") Seems a...
  7. AOB

    Need some help making a bad query good (AC2007)

    I've had a go - not as elegant as your suggestions but it seems to work?... SELECT DISTINCT tblX1.Book, tblX1.Centre FROM tblX1 INNER JOIN (SELECT A.Book, Count(A.Centre) AS NoOfCentres FROM (SELECT DISTINCT tblX1.Book, tblX1.Centre FROM tblX1) AS A GROUP BY...
  8. AOB

    Need some help making a bad query good (AC2007)

    Mmmm, no that's not working for me jdraw? It is returning a single record for multiple combinations of the same book / centre (a good thing) But it's also returning multiple centres for certain books (i.e. multiple records for the same book) (e.g. the "Conor" example below) I have to...
  9. AOB

    Need some help making a bad query good (AC2007)

    Probably a bad choice of example - see revised records thus : [Book] | [Centre] | [Source] --------|----------|--------- Alan | Dublin | ABCDBlah Barry | London | WXYZBlah Conor | Paris | ABCDBlah Conor | New York | WXYZBlah David | Geneva | PQRSBlah David | Lisbon |...
  10. AOB

    Need some help making a bad query good (AC2007)

    Guys, Sorry to resurrect but... I've found an issue... In a scenario where the same book / center combination appears more than once : [Book] | [Centre] | [Source] -------|----------|--------- Alan | Dublin | EFGHBlah Alan | Dublin | EFGHBlah These queries : SELECT distinct...
  11. AOB

    Most suitable function to calculate laydays

    I don't see any difference between A1 and A2?...
  12. AOB

    Most suitable function to calculate laydays

    You can't mix your blocks up like that. Each one must be able to 'stand alone'. Either put the Select Case / End Select wholly inside the If / End If block, or vice versa. Select Case x Case y If z Then ' Course of action Else ' Alternate course of...
  13. AOB

    Most suitable function to calculate laydays

    Compiles fine for me? Can you paste your exact code?
  14. AOB

    Most suitable function to calculate laydays

    See in red... Public Function DChargeAmount(tariff As Variant, datIn As Date, datOut As Date) As Double lngNumDays = DateDiff("d", datIn, datOut) If datIn < DateSerial(2015, 9, 20) Then Select Case tariff Case Is = 1 Select Case lngNumDays...
  15. AOB

    Really odd filter behaviour (AC2007)

    Ah okay I getcha - I'm not overly concerned - the field isn't used for anything, I just have it so I can trace activity - I have separate fields to distinguish the other attributes that you've pointed out. Thanks for clarifying though, I was sweating for a second there...
  16. AOB

    Really odd filter behaviour (AC2007)

    B******s, why is that Mailman?? :eek:
  17. AOB

    Really odd filter behaviour (AC2007)

    What's error 40 spike, I'm not familiar with it?
  18. AOB

    Really odd filter behaviour (AC2007)

    Yessss... Just beat me to it Mailman, I just discovered I was accidentally including the time portion when records were being manually added (it is pure date when they are automated) Have changed the update process now to exclude the time and will run a quick update query now to remove the...
  19. AOB

    Really odd filter behaviour (AC2007)

    Hi guys, Was investigating an issue this morning and came across some very odd behaviour when filtering a table. The table has a number of date fields but concerned with one in particular (ImportDate) When I open the table in datasheet view and filter on ImportDate (i.e. scroll down the...
  20. AOB

    MQ feeds into Access BE - is it possible? (AC2007)

    Wonderful - thanks Boyd!
Back
Top Bottom