If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > Delphi, C etc > Need Help in "subscript out of range "

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 07-02-03, 08:38
alicejwz alicejwz is offline
Registered User
 
Join Date: May 2002
Posts: 395
Need Help in "subscript out of range "

I have been struggling to fix this error. Just as I thought I fixed the problem the error pops up again. I really need some help.
What I want is to verify the Dim and ReDim statements. Are they correct? Where do you think caused the error? What does it means?

Thank you for your assistance!!

Here is my code:

I have been struggling to fix this error. Just as I thought I fixed the problem the error pops up again. I really need some help.
What I want is to verify the Dim and ReDim statements. Are they correct? Where do you think caused the error?

Thank you for your assistance!!

Here is my code:

Dim field_list() As String
Dim display_fields() As String
Const field_list_length As Integer = 25

Public Sub Form_Open(Cancel As Integer)

Me!shipping_sched_list_subform.SourceObject = "shipping_sched_list"
ReDim display_fields(field_list_length - 1)
ReDim field_list(field_list_length - 1)
Call intialize_field_list
Call prep_sched_input

End Sub


Sub intialize_field_list()

field_list(0) = "work_ord_num"
field_list(1) = "cust_name"
: :
: :
field_list(24) = "work_ord_line_num"

End Sub



Sub prep_sched_input()
On Error GoTo Err_prep_sched_input

Call initialize_display_fields
display_fields(0) = "work_ord_num"
display_fields(1) = "cust_name"
: :
display_fields(17) = "work_ord_line_num"
Call set_columns


End Sub



Sub initialize_display_fields()
Dim i As Integer

For i = 0 To field_list_length - 1
display_fields(i) = "" 'display_fields begins w/ zero
'''' ERROR OCCURRED HERE in display_fields array
Next

End Sub
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On