-
"Bad ercord lenght"
Hi !
Could anybody tell me what the hell is the problem with this:
-----
Dim ord() As Orders
filenum = FreeFile
Open "C:\orders" For Random As filenum Len = Len((ord(0)))
recordNo = LOF(filenum) / Len(ord(0))
ReDim ord(recordNo)
For k = 1 To recordNo
Get filenum, k, ord(k - 1)
Next k
Close filenum
-----
The "Orders" type defined as:
-----
Type Orders
OrderNo As Double
OrdDate As Date
item As String * 9
OrdQty As Double
OrdPrice As Double
ReqDelDate As Date
ConfDelDate As Date
Over As Boolean
End Type
------
The error message is : "Bad record lenght" at the row: "Get filenum, k, ord(k - 1)". It is interesting that the same Open statement in an other part of my program works well. I am really getting mad about it. And what is more it is not always behaving like that: sometimes works well sometimes gives this error message. Why ?
I would be greatful if somebody gave me a useful answer.
Thanks,
lazlo