Dear All,
What the Variant value on Ms Access latest version is same with Ms Access previously(97,2003).?
Im using office 2010
I have face error again in line
messagebox said is "subscript out of range(error 9) and cursor stop in
.
for code program previously ,
Thanks for your help
What the Variant value on Ms Access latest version is same with Ms Access previously(97,2003).?
Im using office 2010
I have face error again in line
Code:
-----------------------------------------
bd = ""
[B]bd = Split(bx(1), " ")[/B]
For i = 0 To (UBound(bd) - 1)
Me("p" & i).Caption = bd(i)
Me("p" & i).Visible = True
Next i
----------------------------------------
messagebox said is "subscript out of range(error 9) and cursor stop in
Code:
[B]bd = Split(bx(1), " ")[/B]
for code program previously ,
Code:
========================================
Private Sub show()
Dim at, bb, url As String
Dim bc, bd, be, j, bx As Variant
Dim i, t As Integer
Dim tbb, tb2 As Variant
For i = 0 To 10
Me("p" & i).Caption = ""
Me("p" & i).Visible = False
Next i
status.Caption = ""
If InternetGetConnectedState(0&, 0&) Then
url = "my_site.com/showdata_rev.php"
at = fcSend("&page=" & fpage, url)
Text5 = at
If Text5 <> "" Then
f1.SourceObject = ""
f1.Visible = False
Text7.Visible = False
Text5 = Replace(Text5, vbTab, "")
Text5 = Replace(Text5, vbCr, "")
Text5 = Replace(Text5, vbLf, "")
bb = ""
bx = Split(Text5, "<>")
bd = Split(bx(0), "~")
tbb = "try_"
hp_tb (tbb)
DoCmd.RunSQL "CREATE TABLE " & tbb _
& " (idemployee Number,rectime datetime," _
& " FirstName Text(255), MiddleName Text(255)," _
& " LastName Text(255), Placebirth Text(255)," _
& " datebirth datetime, passport text(10)," _
& " 1starrivedate datetime," _
& " leavedate datetime,address text(255)," _
& " email1 text(255),telp number,status text(50),nationality text(255));" ', DateBirth DateTime);"
Set db = CurrentDb
For i = 0 To (UBound(bd) - 1)
bb = ""
bc = Split(bd(i), "|")
For t = 0 To UBound(bc)
bb = bb & cek_isi(HtmlToText(bc(t)), IsNumeric(HtmlToText(bc(t)))) & ", "
Next t
bb = Trim(bb)
bb = Left(bb, (Len(bb) - 1))
db.Execute "insert into " & tbb & " values" _
& " (" & bb & ")"
Next i
db.Close
Set db = Nothing
bd = ""
[B]bd = Split(bx(1), " ")[/B]
For i = 0 To (UBound(bd) - 1)
Me("p" & i).Caption = bd(i)
Me("p" & i).Visible = True
Next i
status.Caption = Trim(bx(2))
If UBound(bd) < 1 Then
bb = "Nothing found data"
f1.Visible = False
Text7.Visible = True
Else
f1.SourceObject = "f1"
f1.Form.RecordSource = tbb
f1.Visible = True
End If
Else
bb = "Wrong Destination"
End If
For i = 0 To 10
If Me("p" & i).Caption = "" Then
Me("p" & i).Visible = False
End If
Next i
Else
MsgBox "Connection Internet is problem." & vbCrLf _
& "Please try again" & vbCrLf _
& "with other session", , ":: Disconnect"
End If
End Sub
=====================================
Last edited: