12/19/2003
some coding
Option Compare Database
Private Sub Command217_Click()
End Sub
Private Sub Command24_Click()
On Error GoTo Err_Command24_Click
DoCmd.GoToRecord , , acLast
Exit_Command24_Click:
Exit Sub
Err_Command24_Click:
MsgBox Err.Description
Resume Exit_Command24_Click
End Sub
Private Sub Command25_Click()
On Error GoTo Err_Command25_Click
DoCmd.GoToRecord , , acNewRec
Exit_Command25_Click:
Exit Sub
Err_Command25_Click:
MsgBox Err.Description
Resume Exit_Command25_Click
End Sub
Private Sub Command26_Click()
On Error GoTo Err_Command26_Click
Me.data_mmyydd = Now()
DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
Exit_Command26_Click:
Exit Sub
Err_Command26_Click:
MsgBox Err.Description
Resume Exit_Command26_Click
End Sub
Private Sub Command27_Click()
On Error GoTo Err_Command27_Click
Dim oApp As Object
Set oApp = CreateObject("Word.Application")
oApp.Visible = True
Exit_Command27_Click:
Exit Sub
Err_Command27_Click:
MsgBox Err.Description
Resume Exit_Command27_Click
End Sub
Private Sub Command28_Click()
On Error GoTo Err_Command28_Click
DoCmd.DoMenuItem acFormBar, acRecordsMenu, 2, , acMenuVer70
Exit_Command28_Click:
Exit Sub
Err_Command28_Click:
MsgBox Err.Description
Resume Exit_Command28_Click
End Sub
Private Sub Command30_Click()
On Error GoTo Err_Command30_Click
Call Shell("NOTEPAD.EXE", 1)
Exit_Command30_Click:
Exit Sub
Err_Command30_Click:
MsgBox Err.Description
Resume Exit_Command30_Click
End Sub
Private Sub CommandButton1_Click()
TextBox2.SelStart = 0
TextBox2.SelLength = TextBox2.TextLength
TextBox2.Cut
TextBox1.SetFocus
TextBox1.SelStart = 0
TextBox1.Paste
TextBox2.SelStart = 0
End Sub
Private Sub Command32_Click()
On Error GoTo Err_Command32_Click
DoCmd.DoMenuItem acFormBar, acRecordsMenu, 2, , acMenuVer70
Exit_Command32_Click:
Exit Sub
Err_Command32_Click:
MsgBox Err.Description
Resume Exit_Command32_Click
End Sub
Private Sub Command43_Click()
On Error GoTo Err_Command43_Click
Dim oApp As Object
Set oApp = CreateObject("Excel.Application")
oApp.Visible = True
'Only XL 97 supports UserControl Property
On Error Resume Next
oApp.UserControl = True
Exit_Command43_Click:
Exit Sub
Err_Command43_Click:
MsgBox Err.Description
Resume Exit_Command43_Click
End Sub
Private Sub Command48_Click()
On Error GoTo Err_Command48_Click
Screen.PreviousControl.SetFocus
DoCmd.DoMenuItem acFormBar, acEditMenu, 10, , acMenuVer70
Exit_Command48_Click:
Exit Sub
Err_Command48_Click:
MsgBox Err.Description
Resume Exit_Command48_Click
End Sub
Private Sub Command49_Click()
On Error GoTo Err_Command49_Click
DoCmd.GoToRecord , , acFirst
Exit_Command49_Click:
Exit Sub
Err_Command49_Click:
MsgBox Err.Description
Resume Exit_Command49_Click
End Sub
Private Sub Command50_Click()
On Error GoTo Err_Command50_Click
DoCmd.GoToRecord , , acNext
Exit_Command50_Click:
Exit Sub
Err_Command50_Click:
MsgBox Err.Description
Resume Exit_Command50_Click
End Sub
Private Sub Command51_Click()
On Error GoTo Err_Command51_Click
DoCmd.GoToRecord , , acPrevious
Exit_Command51_Click:
Exit Sub
Err_Command51_Click:
MsgBox Err.Description
Resume Exit_Command51_Click
End Sub
Private Sub data_descr_Click()
On Error GoTo Errorhandler
Dim sstrng, schar, stpos, endpos, sposa, spose
Dim sanf As Long, send As Long, mleng As Long
Dim desta, desend, contsta
' _________
contsta = "content="""
desta = "description"""
desend = """>"
' _________
sposa = 1
stpos = 1
sanf = 0
send = 0
' _________
sstrng = Me![data_HTML]
stpos = InStr(sposa, sstrng, desta, 1)
stpos = InStr(stpos, sstrng, contsta, 1)
endpos = InStr(stpos, sstrng, desend, 1)
' __________
sanf = stpos
sanf = sanf + Len(contsta)
send = endpos
' MsgBox send - sanf
mleng = send - sanf
If (mleng >= 255) Then
mleng = 255
' MsgBox ("Description length changed to: ") & mleng
Else
' MsgBox ("unchanged")
End If
Me![data_descr] = Mid(Me![data_HTML], sanf, mleng)
Exit Sub
Errorhandler:
Me![data_descr] = "Description: no data stored"
' MsgBox ("stpos: ") & stpos & ("endpos: ") & endpos & ("desta: ") & desta & ("deend: ") & desend
Exit Sub
End Sub
Private Sub data_keyw_Click()
On Error GoTo Errorhandler
Dim sstrng, schar, stpos, endpos, sposa, spose
Dim sanf As Long, send As Long, mleng As Long
Dim kwsta, kwend, contsta, contend
' _________
kwsta = "keywords"""
contsta = "content="""
kwend = """>"
desta = "description"
desend = """>"
' _________
sposa = 1
stpos = 1
sanf = 0
send = 0
' _________
sstrng = Me![data_HTML]
stpos = InStr(sposa, sstrng, kwsta, 1)
stpos = InStr(stpos, sstrng, contsta, 1)
' sstrng = Me![data_HTML]
endpos = InStr(stpos, sstrng, kwend, 1)
'
' MsgBox kwsta & contsta
' MsgBox stpos & " " & endpos
' __________
sanf = stpos
sanf = sanf + Len(contsta)
send = endpos
mleng = send - sanf
If (mleng >= 255) Then
mleng = 255
' MsgBox ("Description length changed to: ") & mleng
Else
' MsgBox ("unchanged")
End If
Me![data_keyw] = Mid(Me![data_HTML], sanf, mleng)
Exit Sub
Errorhandler:
Me![data_keyw] = "Keyw:no data stored"
' MsgBox ("stpos: ") & stpos & ("endpos: ") & endpos & ("keysta: ") & keysta & ("keyend: ") & keyend
Exit Sub
End Sub
Private Sub data_len_Click()
Me![data_len] = Len([data_HTML])
End Sub
Private Sub data_loopresult_Click()
End Sub
Private Sub data_title_Click()
On Error GoTo Errorhandler
Dim sstrng, schar, stpos, endpos, sposa, spose
Dim sanf As Long, send As Long
Dim tista, tiend
' _________
tista = ""
tiend = " "
' _________
sposa = 1
stpos = 1
sanf = 0
send = 0
' _________
sstrng = Me![data_HTML]
stpos = InStr(sposa, sstrng, tista, 1)
stpos = stpos + Len(tista)
sstrng = Me![data_HTML]
endpos = InStr(stpos, sstrng, tiend, 1)
' __________
sanf = stpos
send = endpos
' MsgBox sanf & endpos & Len(tista)
Me![data_title] = Mid(Me![data_HTML], sanf, send - sanf)
Exit Sub
Errorhandler:
Me![data_title] = "Title:no data stored"
' MsgBox ("stpos: ") & stpos & ("endpos: ") & endpos & ("tista: ") & tista & ("tiend: ") & tiend
Exit Sub
End Sub
Private Sub List237_Click()
ww_Click
End Sub
Private Sub T63_Click()
' check the end of HTML
On Error GoTo Errorhandler
Dim sstrng, schar, stpos, endpos, sposa, spose
Dim sanf As Long, send As Long
Dim bodsta, htmsta
' _________
sposa = 1
stpos = 1
sanf = 0
send = 0
' _________
bodsta = "
Private Sub Command217_Click()
End Sub
Private Sub Command24_Click()
On Error GoTo Err_Command24_Click
DoCmd.GoToRecord , , acLast
Exit_Command24_Click:
Exit Sub
Err_Command24_Click:
MsgBox Err.Description
Resume Exit_Command24_Click
End Sub
Private Sub Command25_Click()
On Error GoTo Err_Command25_Click
DoCmd.GoToRecord , , acNewRec
Exit_Command25_Click:
Exit Sub
Err_Command25_Click:
MsgBox Err.Description
Resume Exit_Command25_Click
End Sub
Private Sub Command26_Click()
On Error GoTo Err_Command26_Click
Me.data_mmyydd = Now()
DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
Exit_Command26_Click:
Exit Sub
Err_Command26_Click:
MsgBox Err.Description
Resume Exit_Command26_Click
End Sub
Private Sub Command27_Click()
On Error GoTo Err_Command27_Click
Dim oApp As Object
Set oApp = CreateObject("Word.Application")
oApp.Visible = True
Exit_Command27_Click:
Exit Sub
Err_Command27_Click:
MsgBox Err.Description
Resume Exit_Command27_Click
End Sub
Private Sub Command28_Click()
On Error GoTo Err_Command28_Click
DoCmd.DoMenuItem acFormBar, acRecordsMenu, 2, , acMenuVer70
Exit_Command28_Click:
Exit Sub
Err_Command28_Click:
MsgBox Err.Description
Resume Exit_Command28_Click
End Sub
Private Sub Command30_Click()
On Error GoTo Err_Command30_Click
Call Shell("NOTEPAD.EXE", 1)
Exit_Command30_Click:
Exit Sub
Err_Command30_Click:
MsgBox Err.Description
Resume Exit_Command30_Click
End Sub
Private Sub CommandButton1_Click()
TextBox2.SelStart = 0
TextBox2.SelLength = TextBox2.TextLength
TextBox2.Cut
TextBox1.SetFocus
TextBox1.SelStart = 0
TextBox1.Paste
TextBox2.SelStart = 0
End Sub
Private Sub Command32_Click()
On Error GoTo Err_Command32_Click
DoCmd.DoMenuItem acFormBar, acRecordsMenu, 2, , acMenuVer70
Exit_Command32_Click:
Exit Sub
Err_Command32_Click:
MsgBox Err.Description
Resume Exit_Command32_Click
End Sub
Private Sub Command43_Click()
On Error GoTo Err_Command43_Click
Dim oApp As Object
Set oApp = CreateObject("Excel.Application")
oApp.Visible = True
'Only XL 97 supports UserControl Property
On Error Resume Next
oApp.UserControl = True
Exit_Command43_Click:
Exit Sub
Err_Command43_Click:
MsgBox Err.Description
Resume Exit_Command43_Click
End Sub
Private Sub Command48_Click()
On Error GoTo Err_Command48_Click
Screen.PreviousControl.SetFocus
DoCmd.DoMenuItem acFormBar, acEditMenu, 10, , acMenuVer70
Exit_Command48_Click:
Exit Sub
Err_Command48_Click:
MsgBox Err.Description
Resume Exit_Command48_Click
End Sub
Private Sub Command49_Click()
On Error GoTo Err_Command49_Click
DoCmd.GoToRecord , , acFirst
Exit_Command49_Click:
Exit Sub
Err_Command49_Click:
MsgBox Err.Description
Resume Exit_Command49_Click
End Sub
Private Sub Command50_Click()
On Error GoTo Err_Command50_Click
DoCmd.GoToRecord , , acNext
Exit_Command50_Click:
Exit Sub
Err_Command50_Click:
MsgBox Err.Description
Resume Exit_Command50_Click
End Sub
Private Sub Command51_Click()
On Error GoTo Err_Command51_Click
DoCmd.GoToRecord , , acPrevious
Exit_Command51_Click:
Exit Sub
Err_Command51_Click:
MsgBox Err.Description
Resume Exit_Command51_Click
End Sub
Private Sub data_descr_Click()
On Error GoTo Errorhandler
Dim sstrng, schar, stpos, endpos, sposa, spose
Dim sanf As Long, send As Long, mleng As Long
Dim desta, desend, contsta
' _________
contsta = "content="""
desta = "description"""
desend = """>"
' _________
sposa = 1
stpos = 1
sanf = 0
send = 0
' _________
sstrng = Me![data_HTML]
stpos = InStr(sposa, sstrng, desta, 1)
stpos = InStr(stpos, sstrng, contsta, 1)
endpos = InStr(stpos, sstrng, desend, 1)
' __________
sanf = stpos
sanf = sanf + Len(contsta)
send = endpos
' MsgBox send - sanf
mleng = send - sanf
If (mleng >= 255) Then
mleng = 255
' MsgBox ("Description length changed to: ") & mleng
Else
' MsgBox ("unchanged")
End If
Me![data_descr] = Mid(Me![data_HTML], sanf, mleng)
Exit Sub
Errorhandler:
Me![data_descr] = "Description: no data stored"
' MsgBox ("stpos: ") & stpos & ("endpos: ") & endpos & ("desta: ") & desta & ("deend: ") & desend
Exit Sub
End Sub
Private Sub data_keyw_Click()
On Error GoTo Errorhandler
Dim sstrng, schar, stpos, endpos, sposa, spose
Dim sanf As Long, send As Long, mleng As Long
Dim kwsta, kwend, contsta, contend
' _________
kwsta = "keywords"""
contsta = "content="""
kwend = """>"
desta = "description"
desend = """>"
' _________
sposa = 1
stpos = 1
sanf = 0
send = 0
' _________
sstrng = Me![data_HTML]
stpos = InStr(sposa, sstrng, kwsta, 1)
stpos = InStr(stpos, sstrng, contsta, 1)
' sstrng = Me![data_HTML]
endpos = InStr(stpos, sstrng, kwend, 1)
'
' MsgBox kwsta & contsta
' MsgBox stpos & " " & endpos
' __________
sanf = stpos
sanf = sanf + Len(contsta)
send = endpos
mleng = send - sanf
If (mleng >= 255) Then
mleng = 255
' MsgBox ("Description length changed to: ") & mleng
Else
' MsgBox ("unchanged")
End If
Me![data_keyw] = Mid(Me![data_HTML], sanf, mleng)
Exit Sub
Errorhandler:
Me![data_keyw] = "Keyw:no data stored"
' MsgBox ("stpos: ") & stpos & ("endpos: ") & endpos & ("keysta: ") & keysta & ("keyend: ") & keyend
Exit Sub
End Sub
Private Sub data_len_Click()
Me![data_len] = Len([data_HTML])
End Sub
Private Sub data_loopresult_Click()
End Sub
Private Sub data_title_Click()
On Error GoTo Errorhandler
Dim sstrng, schar, stpos, endpos, sposa, spose
Dim sanf As Long, send As Long
Dim tista, tiend
' _________
tista = "
tiend = "
' _________
sposa = 1
stpos = 1
sanf = 0
send = 0
' _________
sstrng = Me![data_HTML]
stpos = InStr(sposa, sstrng, tista, 1)
stpos = stpos + Len(tista)
sstrng = Me![data_HTML]
endpos = InStr(stpos, sstrng, tiend, 1)
' __________
sanf = stpos
send = endpos
' MsgBox sanf & endpos & Len(tista)
Me![data_title] = Mid(Me![data_HTML], sanf, send - sanf)
Exit Sub
Errorhandler:
Me![data_title] = "Title:no data stored"
' MsgBox ("stpos: ") & stpos & ("endpos: ") & endpos & ("tista: ") & tista & ("tiend: ") & tiend
Exit Sub
End Sub
Private Sub List237_Click()
ww_Click
End Sub
Private Sub T63_Click()
' check the end of HTML
On Error GoTo Errorhandler
Dim sstrng, schar, stpos, endpos, sposa, spose
Dim sanf As Long, send As Long
Dim bodsta, htmsta
' _________
sposa = 1
stpos = 1
sanf = 0
send = 0
' _________
bodsta = "