Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Hi

 

I am trying to put some data into fieldname, fieldstartpos and fieldendpos, from a form, by:

 

Form Code

FieldName = txtFieldName.Text

 

This is in a module.

Public Structure FieldRecord ' Create user-defined type.

Public FieldName As String

Public FieldStartPos As Integer

Public FieldEndPos As Integer

End Structure

 

Public Field_List() As FieldRecord

 

But the problem i am facing is that is wont recognise fieldname - Could someone please tell me why?

 

Thanks.

Posted

I get the blue line underneath the FieldName in the form code, when its typed in.

 

I have enclosed the code in a zip below. The error is half way down the 'Private Sub listFields_SelectedIndexChanged' in the frmOptions form.

 

Thanks.

ports.zip

  • Administrators
Posted

Looking at the code the problem seems to be that you haven't declared a variable FieldName anywhere in the form, you will need to reference the structure containing the FieldName member. Something like

 

Dim f As FieldRecord
f.FieldName = txtFieldName.Text

Posting Guidelines FAQ Post Formatting

 

Intellectuals solve problems; geniuses prevent them.

-- Albert Einstein

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...