dcsimg
Login | Register   
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX

By submitting your information, you agree that devx.com may send you DevX offers via email, phone and text message, as well as email offers about other products and services that DevX believes may be of interest to you. DevX will process your information in accordance with the Quinstreet Privacy Policy.


Tip of the Day
Language: Visual FoxPro
Expertise: Beginner
Jan 21, 2000

WEBINAR:

On-Demand

Application Security Testing: An Integral Part of DevOps


Popping Up a Form

Question:
I have a form for which I do not want to give the user navigation privileges. I want the form to pop up at the record specified by a parameter with the "do form" command.

I understand that I can pass a param with "Do form col001 with 123456" and then handle the parameter 123456 in the init event of the form.

But when the form appears, it shows the top record of the file and not the one specified by the parameter.

How do I make this work?

Answer:
I assume that the 123456 is the primary key or something that gives you a clue as to which record to display. For sake of example, let's call the "calling form" the ParentForm and the "called form" the ChildForm.

It sounds like the ChildForm has a private datasession, and that the table from the ParentForm is being USE'd AGAIN in this private datasession. That is not necessarily a bad thing. If this is the case, you just need to use the passed parameter to LOCATE or SEEK the record you want in the Init().

Another approach would be to give the ChildForm a default datasession and remove the table from the dataenvironment of the child form. Since you are not creating a private datasession, the table/view will already be open, so there will be no need to move the record pointer.

DevX Pro
 
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap
×
We have made updates to our Privacy Policy to reflect the implementation of the General Data Protection Regulation.
Thanks for your registration, follow us on our social networks to keep up-to-date