Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Data Form Wizard with VID 6 Add Filter

Status
Not open for further replies.

GrantReid

Technical User
Jul 24, 2001
5
ZA
Hi

Being a relative newcomer to VID, looking for a quick onramp to the product and some working examples of code, I came across the following articles in the MS Knowledge Base;

HOWTO: Create a Visual InterDev 1.0 Data Form Wizard with Visual Interdev 6.0

HOWTO: Create a Visual InterDev 1.0 Data Form Wizard with Visual Interdev 6.0 Add Filter

After successfully working through the first article, discovering a typo on the way, I began with the second article. Try as I might, I have been unable to get this sample working. I keep on getting the following error message;

Microsoft VBScript runtime error '800a01a8' Object required: 'pageDFW'

I think the problem lies in this line of code in the subroutine ApplyFilter;

If Not IsNull(pageDFW.getFilter()) Then

Has anyone out there got this sample to work? And if so, can you help?

Thanks - Grant
 
I've not tried to get this working, but you need to add a 'PageObject' DTC and give it the name "pageDFW". If you then edit its properties and add a 'property' called "Filter", then lo-and-behold you can save values for retrieval at a later date (ie after the user has navigated elsewhere)...
pageDFW.setFilter <value>
or
sValue = pageDFW.getFilter() & &quot;&quot;
[by combining it with an empty string you will never have to cope with the value NULL]

Of course you could call the page object anything you like - typically it is the same name as the page you are editing.

You can also refer to the page object DTC using thisPage

So the samples above could also be written as:

thisPage.setFilter sValue
or
sValue = thisPage.getFilter() & &quot;&quot;


You can have as many PageObject properties as you like - so add another called 'Fred' and set it using...
thisPage.setFred &quot;Hi Fred&quot;
and so on.

Also note, you gain access to them via the set/get methods - you cannot set the property like this:
thisPage.setFred = &quot;this fails&quot;
do NOT use the = (equals) - as this sets the CODE under this command to the text. (If you really wanted to know!)
(Content Management)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top