As far as I know , for ms-access 2000, jetoledb4.0 is used not 3.51
change this part to
VB Code:
With conn .ConnectionString = "Provider=Microsoft.Jet.OLEDB.3.51;Persist Security Info=False;Data Source=C:\Documents and Settings\Administrator\Desktop\Joriki 02202006\Joriki_new_03_13_06.mdb;" conn.Open End With
to this
VB Code:
With conn .ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;" _ & "Persist Security Info=False;" _ & "Data Source=C:\Documents and Settings\Administrator\Desktop\Joriki 02202006\Joriki_new_03_13_06.mdb;" .Open End With
And this
VB Code:
rs.Open "select Max(OrderNbr) as MaxNumber from Orderheaders where CustomerID = " & OrderNbr.Text & ", conn, adOpenStatic , adLockOptimistic"
to this
VB Code:
rs.Open "select Max(OrderNbr) as MaxNumber from Orderheaders where CustomerID = '" & OrderNbr.Text & "'" _ , conn, adOpenStatic , adLockOptimistic




Reply With Quote