Hi guys, i have a bit of a problem here, my dbase has been working for ages!, and now all of a sudden i get this error: "invalid use of New keyword"
when this code is executed:
it stops at this line: "Set aConn = New Connection"
i hope someone know why it is doing this??
cheers
Jurgen
when this code is executed:
Code:
Dim aConn As Connection
Dim aRecordset As Recordset
Set aConn = New Connection
aConn.Open "DSN=Prospect"
Set aRecordset = New Recordset
aRecordset.Open _
Source:="Select max([our order number]) as nextorder from orders", _
ActiveConnection:=aConn, _
CursorType:=adOpenStatic, _
LockType:=adLockReadOnly
aRecordset.MoveFirst
Me.Our_Order_Number.SetFocus
Me.Our_Order_Number.Text = aRecordset!nextorder + 1
Set aRecordset = Nothing
Set aConn = Nothing
it stops at this line: "Set aConn = New Connection"
i hope someone know why it is doing this??
cheers
Jurgen