On 12 Jan 2006 09:33:05 -0800, "Lyle Fairfield"
<ly***********@ aim.com> wrote:
What is the code for MakeITS?
Function MakeITS(OwnerFN ame As Variant, OwnerLName As Variant,
RecipAddr As Variant, OwnerCity As Variant, _
OwnerState As Variant, OwnerZip As Variant, Corporation As Variant,
VehicleJobID As Variant) As String
'************** *************** *************** *************** ***********
' This function is called by qryITSLetterLis t, which furnishes all the
' arguments to this function.
'************** *************** *************** *************** ***********
100 On Error GoTo MakeITS_Err
110 Dim TheOwner As String, TheName As String, TheAddr As String,
TheCSZ As String, ThePhone As String
120 Dim TheCity As String, TheState As String, TheZip As String,
RecipName As String, RecipCSZ As String
130 TheOwner = DLookup("[TheOwnerFName]", "tblAdmin") & " " &
DLookup("[TheOwnerLName]", "tblAdmin")
140 TheName = DLookup("[Thempany]", "tblAdmin")
150 TheAddr = DLookup("[TheAddr]", "tblAdmin")
160 TheCity = DLookup("[TheCity]", "tblAdmin")
170 TheState = DLookup("[TheState]", "tblAdmin")
180 TheZip = DLookup("[TheZip]", "tblAdmin")
190 ThePhone = Format$(DLookup ("[ThePhn]", "tblAdmin") , "(@@@)
@@@-@@@@")
200 TheCSZ = TheCity & ", " & TheState & " " & TheZip
210 If Corporation = False Then RecipName = Nz(OwnerFName) & " " &
Nz(OwnerLName) Else RecipName = Nz(OwnerFName)
220 If RecipName = "" Or RecipName = " " Or IsNull(RecipNam e) Then
RecipName = "Owner Name Unknown"
230 RecipCSZ = Nz(OwnerCity) & ", " & Nz(OwnerState) & " " &
Nz(OwnerZip)
240 If RecipCSZ = ", " Then RecipCSZ = "Owner City/State/Zip
Unknown"
' NOTICE OF INTENT TO SELL A VEHICLE TO SATISFY
STORAGE AND/OR MECHANIC’S LIEN FORM LETTER
250 MyString = "Date: " & Format$(Now, "Long Date") & CRLF & CRLF
260 MyString = MyString & "To:" & CRLF & RecipName & CRLF &
Nz(RecipAddr, "Owner Address Unknown") & CRLF & Nz(RecipCSZ) & CRLF &
CRLF
270 MyString = MyString & "From:" & CRLF & TheOwner & CRLF & TheName &
CRLF & TheAddr & CRLF & TheCSZ & CRLF & ThePhone & CRLF & CRLF
280 MyString = MyString & "The person or firm shown in Section F of
the enclosed NOTICE OF INTENT TO SELL A VEHICLE TO SATISFY STORAGE
AND/"
290 MyString = MyString & "OR MECHANICS LIEN form intends to sell the
vehicle described on the form to satisfy a mechanic’s and/"
300 MyString = MyString & "or storage lien. The amount of the lien,
the services for which the lien is claimed, and the date the lien
became "
310 MyString = MyString & "due are indicated in Section C and D of the
form." & CRLF & CRLF
320 MyString = MyString & "If you feel the lien described in Section C
of the enclosed form is invalid, or you wish to question the validity
"
330 MyString = MyString & "of the lien, you have the right to a
judicial hearing to determine the validity of the lien. To question
the valid"
340 MyString = MyString & "ity of the lien, you must notify the lienor
by completing the request for judicial hearing that appears at the
bottom "
350 MyString = MyString & "of this page and you must return this
letter to the lienor at the address indicated in Section F of the
enclosed NOTICE "
360 MyString = MyString & "OF INTENT TO SELL A VEHICLE TO SATISFY
STORAGE AND/OR MECHANIC’ LIEN form by registered mail or certified "
370 MyString = MyString & "mail, return receipt requested, within ten
(10) days." & CRLF & CRLF
380 MyString = MyString & "Your Failure to return this letter with the
Request For A Judicial Hearing properly completed to the lienor within
"
390 MyString = MyString & "ten (10) days from the date you received
this letter will be considered a waiver of your rights to a hearing
prior "
400 MyString = MyString & "to the sale of this vehicle and the lienor
may enforce the lien by selling the vehicle. If you send the Request
for "
410 MyString = MyString & "a Judicial Hearing to the lienor within the
10 day time period, it will be the responsibility of the lienor to
initiate "
420 MyString = MyString & "the proper action in a court of competent
jurisdiction." & CRLF & CRLF
430 MyString = MyString & "Thank you for your prompt attention to this
matter." & CRLF & CRLF & CRLF
440 CurrentVehicleJ obID = VehicleJobID
450 Dim ccParties As String, MyDB As Database, MyQdef As QueryDef,
MyRecSet As Recordset
452 ccParties = "cc:" & CRLF
460 Set MyDB = CurrentDb()
470 Set MyQdef = MyDB.CreateQuer yDef("", "Select * FROM
qryAuthsOwnersA ddnlOwnersLienh olders4OneCar")
480 With MyQdef
490 Set MyRecSet = .OpenRecordset( dbOpenSnapshot)
500 MyRecSet.MoveFi rst
510 With MyRecSet
520 Do Until MyRecSet.EOF
522 If !OLAX <> "O" Then
530 ccParties = ccParties & !Item
532 End If
540 .MoveNext
550 ccParties = ccParties & CRLF
560 Loop
570 End With
580 End With
590 MyString = MyString & ccParties
600 MakeITS = MyString
MakeITS_Exit:
Exit Function
MakeITS_Err:
Dim r As String, z As String, Message3 As String
r = "The following unexpected error occurred in Function
MakeITS(), line #" & CStr(Erl) & " when called from qryITSLetterLis t:"
z = CRLF & CRLF & str$(Err) & ": " & Quote & Error$ & Quote
Message3 = r & z
MsgBox Message3, 48, "Unexpected Error - " & MyApp$ & ", rev. " &
MY_VERSION$
Resume MakeITS_Exit
End Function