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.

vb6 property missing from method

I have two machines -- 1st one is my development machine, and the 2nd is a laptop with a copy of the program -- both are running identical versions of Windows 7 Ultimate.
My dll I'm using works on all the methods/properties on both machines except the development machine doesn't have the options for the properties of one method
Development machine:

Sub RecordsetReport()
Member of PrintPreview5.Preview
Create a report from a recordset

On Laptop

Sub RecordsetReport(oRecordset As Recordset, [Headers As Boolean = False], [bWidths As Boolean = False], [etsStep As eAutoStep = 1])
Member of PrintPreview5.Preview
Create a report from a recordset.

On the development machine I have removed the dll from the references of the project, unregistered the dll, copied from the laptop, then registrated the dll, then added back to references --no effect

I have uninstalled vb6 and reinstalled -- no effect (both sp6)

I have checked the project references and components to verify that the exact copies were on development machine that is on the laptop. Also they are in same order (remember something from past that some references/components didn't work unless they were in same order).

I open some access datasets, so I don't think that is the issue.

What's really strange is that this RecordsetReport method is the only one that doesn't work.

I have grabbed the source on the development machine from the laptop and it works there

Re: vb6 property missing from method

Recordset could be an issue

Code:

Dim RS1 As Recordset
Set RS1 = New Recordset

VB6 has both a DAO recordset and an ADO recordset. Normally you would not have an issue dimming as you have done provided that you only have a reference to one of those libaries e.g. ADO or DAO. If however you have both then that could be a problem.

I would suggest that you double check your rreferences to make sure that you do have the ADO in there [Microsoft Active X Data Objects]

I would also suggest changing the lines above to

Code:

Dim RS1 As ADODB.Recordset
Set RS1 = New ADODB.Recordset

See if that solves the issue

There may be other areas where you need to add that ADODB. part as well, like in the Sub Definition and where ever you are defining or setting a recordset object.

Re: vb6 property missing from method

Thanks -- that is usually information about specifically defining the data connectors. I did it, but it didn't make any difference with my problem.

My problem seems to be that the vb6 ide won't recognize the properties of one of the methods in my program (with the preview5.dll) -- all the dll's method's show up with the correct properties, except the RecordSetReport. I downloaded a copy of PE Explorer and tracked down this method -- the results are below:

//Create a report from a recordset.
function RecordsetReport(out oRecordset: ^^UserDefined; out Headers: ^Bool; out bWidths: ^Bool; out etsStep: ^eAutoStep); stdcall;

so it's in the dll, but definition from the vb6 ide only shows:

Sub RecordsetReport()
Member of PrintPreview5.Preview
Create a report from a recordset.

whereas on my laptop it shows the correct properties (same dll, version of references/components, Windows7)

Sub RecordsetReport(oRecordset As Recordset, [Headers As Boolean = False], [bWidths As Boolean = False], [etsStep As eAutoStep = 1])
Member of PrintPreview5.Preview
Create a report from a recordset.

So I guess after all I've changed out, the question is how can the vb ide ignore the properties of a method?

I should be able to insert the RecordsetReport into any of my subs that use the printpreview dll and the properties should show up.

Also remember that I can run the same source across a network, and it works ok (so seems to be computer dependent)

So I guess again, how can the vb ide ignore properties?

Will look up the information to compile from command prompt and see if it will work that way

Re: vb6 property missing from method

Odd. I do not know what the issue would be then. I have never saw an issue like this and have been using VB6 almost daily for over 10 years now, I've had it on lots of different systems and other than making sure I get all the external files properly installed I have not ran into a problem aside from the initial install under Windows 8.

Mostly I use VB6 under XP though. Either as the base OS on the system or in a VM running under the main OS. The nice thing about the Windows Virtual XP Mode is that once you configure it you can copy the VHD file to another machine and duplicate the environment without having to go through all of that install procedure.

Re: vb6 property missing from method

yes, I've been working with vb since vb6, this is a strange problem.
I use VMware and can run virtual machines -- and it works ok on them -- but it is so handy to easily bounce between things -- but it does work in a virtual machine -- so if I can't find out what the problem is, I may have to resort to that.
Thanks for you attention -- if I discover what the problem is -- I'll post here

* The Perfect Platform for Game Developers: Android
Developing rich, high performance Android games from the ground up is a daunting task. Intel has provided Android developers with a number of tools that can be leveraged by Android game developers.

* The Best Reasons to Target Windows 8
Learn some of the best reasons why you should seriously consider bringing your Android mobile development expertise to bear on the Windows 8 platform.