3 Replies - 186 Views - Last Post: 06 September 2018 - 01:34 AM Rate Topic: -----

#1 bdannels   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 03-September 18

Method or data member not found

Posted 03 September 2018 - 11:36 AM

Hello:

I am trying to get a OLD vb6 program to run on a NEW Windows 10, 64 machine.
This program has worked for years on another older machine?
Not knowing much about VB6, I thought I would seek out some help in this forum

Any HELP sure would be appreciated

Thank You
BD

The error ocors in the line: DBGrid2.Columns(0).Width = 800
".Columns" is highlighted
Private Sub Form_Load()
LabelEnt.Left = (Screen.Width - LabelEnt.Width) \ 2
LabelEnt.Top = (Screen.Height - LabelEnt.Height) \ 2

optDatedYes = False
optDatedNo = False

SqlAllCustomers = "SELECT * FROM Orders ORDER BY PlantOrNu"
'& " FROM Customers INNER JOIN Quote ON Customers.QuoteNo = Quote.QuoteNo"
Data2.RecordSource = SqlAllCustomers
Data2.Refresh
DBGrid2.Columns(0).Width = 800
DBGrid2.Columns(1).Width = 800
DBGrid2.Columns(2).Width = 800
DBGrid2.Columns(3).Width = 800
DBGrid2.Columns(4).Width = 1200
DBGrid2.Columns(5).Width = 800
DBGrid2.Columns(6).Width = 800
DBGrid2.Columns(7).Width = 800
DBGrid2.Columns(8).Width = 800
DBGrid2.Columns(9).Width = 800
DBGrid2.Columns(10).Width = 800
DBGrid2.Columns(11).Width = 800
DBGrid2.Columns(12).Width = 800
DBGrid2.Refresh
End Sub
:code:

This post has been edited by modi123_1: 03 September 2018 - 11:56 AM
Reason for edit:: In the future please use the [code] tag button in the editor


Is This A Good Question/Topic? 0
  • +

Replies To: Method or data member not found

#2 modi123_1   User is offline

  • Suitor #2
  • member icon



Reputation: 14685
  • View blog
  • Posts: 58,688
  • Joined: 12-June 08

Re: Method or data member not found

Posted 03 September 2018 - 11:58 AM

What is 'DBGrid2'? A third party tool, out of the box, or what?
Was This Post Helpful? 0
  • +
  • -

#3 bdannels   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 03-September 18

Re: Method or data member not found

Posted 04 September 2018 - 12:18 PM

Thanks for the response.

As far as I can tell it's the actual name of the dbgrid being called, using the dbgrid OLD tool.
Was This Post Helpful? 0
  • +
  • -

#4 maj3091   User is offline

  • D.I.C Lover
  • member icon

Reputation: 331
  • View blog
  • Posts: 2,005
  • Joined: 26-March 09

Re: Method or data member not found

Posted 06 September 2018 - 01:34 AM

A simple check to see if you have the relevant control is to open the form, find the "DBGrid2" control in the properties windows (or click it once on the form) and look at it's type.

If a control isn't found when loading a project, VB6 will warn you and ask if you want to continue, if you say yes, it will replace controls it doesn't find with a PictureBox (normally).

If it's a PictureBox, then you're missing the control.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1