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...
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...
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!
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:
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...
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...
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...
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 |...
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...
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...
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...
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...
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...
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...