Wow fast response thanks pwise,
Only thing is the SET is seting different fields based on the inserted.LVR_Reason data.
14 = SET dbo.TblLotEvents.LE_OrderParts = inserted.LVR_TimeStamp
24 = SET dbo.TblLotEvents.LE_TurnOverlot = inserted.LVR_TimeStamp
Thanks,
Mark
Here is the SQL trigger. It seems to me that checking in the inserted table in the IF statement means I don't need it in the WHERE clause. Any help simplifying this would be appreciated.
CREATE TRIGGER TriggerInstallationComplete ON [mpadmin].[TblLotVisitsReason]
FOR INSERT
AS
IF EXISTS...
I am going to keep using the Top 1 Order By method just in case when I get to altering the ".1" it needs to be bigger or gone.
George really I can't thank you enough =)
Mark
...SearchLongitude As Variant) As Variant
If SearchLatitude <> 0 Or SearchLongitude <> 0 Then
Set MyDB = CurrentDb
MySQL = "Select * From dbo_TblContract "
MySQL = MySQL & "Where sqr((C_Latitude - " & SearchLatitude & ") * (C_Latitude - " & SearchLatitude & ") "
MySQL =...
Even if I am only conserned (for now) with points that are in southern California? Within say 300 miles of eachother max.
I'm new at this whole GPS phone locate the employee thing but that Square root is a killer on the speed.
Mark
...SearchLongitude As Variant) As Variant
If SearchLatitude <> 0 Or SearchLongitude <> 0 Then
Set MyDB = CurrentDb
MySQL = "SELECT * From dbo_TblContract "
MySQL = MySQL & "Where (Abs([C_Longitude] - " & SearchLongitude & ") "
MySQL = MySQL & "+ Abs([C_latitude] - " &...
...SearchLongitude As Variant) As Variant
If SearchLatitude <> 0 Or SearchLongitude <> 0 Then
Set MyDB = CurrentDb
MySQL = "SELECT * From dbo_TblContract "
MySQL = MySQL & "Where (Abs([C_Longitude] - " & SearchLongitude & ") "
MySQL = MySQL & "+ Abs([C_latitude] - " &...
ok here is what I have ...
Select Min(Sqr((C_Latitude - " & SearchLatitude & ") ^ 2 + (C_Longitude - " & SearchLongitude & ") ^ 2)) As FakeDistance,
C_JobNum,
C_PhaseNumber
From dbo_TblContract
Group By C_JobNum, C_PhaseNumber
But I am getting this ...
This qry returns the wrong C_JobNum and C_PhaseNumber actualy it always returns the 1st record in the table rather than the record the Min statement is returning. Can someone please show me how to make this work correctly?
SELECT Min(Abs([C_Longitude]- (-117.61583))+Abs([C_latitude]-...
Now the function will execute but returns the first C_JobNum and C_PhaseNumber from the table rather than the correct C_JobNum and C_PhaseNumber for the record the Min statement is returning.
I tried that already and I get a runtime error '3122':
You tried to execute a query that does not include the specified expression 'C_JobNum' as part of the aggregate function.
Greg,
Great Idea keeping it simple =) and it works kind of ...
I have this SQL statement...
SELECT Min(Abs([C_Longitude]- " & SearchLongitude & ")+Abs([C_latitude]- " & SearchLatitude & ")) AS NearestJobPhase FROM dbo_TblContract;
This gives me a value returned in NearestJobPhase.
But I...
...haven't gotten to stored Procedures yet but I did find DoCmd.RunSQL so now I have this...
Private Function CountMolding()
MySQL = "SELECT * FROM TblItemTransactionTracking WHERE [ITT_CJHLI] = '" & Right(Me.MM_BarCodeScanned, Len(Me.MM_BarCodeScanned) - 7) & "'"
Set MC_RS =...
...it is processing them.
ANY suggestions would be GREATLY appreciated. Please and Thanks.
Private Function CountMolding()
MySQL = "SELECT * FROM TblItemTransactionTracking"
Set MC_RS = MyDB.OpenRecordset(MySQL, dbOpenDynaset, dbSeeChanges)
MySQL = "SELECT * FROM...
...or not.
SELECT Sum(IIf([TblPartsInfo].[PI_SolidPartID]=19 Or [TblPartsInfo].[PI_SolidPartID]=22 Or [TblPartsInfo].[PI_SolidPartID]=23,([LL_CabQty]*[P_Qty])/3,[LL_CabQty]*[P_Qty])) AS QtyParts, IIf([TblPartsInfo].[PI_StockPart]=-1 Or...
I have 3rd party application that uses a access database to keep track of "daily work". I can link to the tables in this aplications database and would like to append the information in the linked tables to my SQL tables as the aplication adds records to its tables.
So...
For each new record...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.