Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Yu-Wah Cheung
  Where is Yu-Wah Cheung?
 
 United Kingdom
 Yu-Wah Cheung
 To: Oxy-
  Where is Oxy-?
 
 Lithuania
 Oxy-
 Tags
Subject: RE: Pass a parameter to remote view when creati...
Thread ID: 15808 Message ID: 15872 # Views: 1 # Ratings: 0
Version: Unknown Category: General VFP Topics
Date: Wednesday, October 02, 2002 6:30:04 PM         
   


> Hi All,
>
> I'm new to foxpro. I want to create a form where the user can edit a certain record from a database (where company_id = ...). I found that form wizard is very convinient for making this kind of form. Although, I'm facing a problem: how to pass the value of my form's custom property "company_id" to the remote view (which has p_CompanyID parameter), so that foxpro wouldn't ask me to enter one?
>
> I tried a different approach. I made the view not to load the data at the creation time. Instead, my form set the p_CompanyID=THISFORM.company_id and then called REQUERY("..."). The problem was that then the wizard-generated buttons, at the bottom of the form, EDIT,SAVE.. were disabled. The button set acted like there would be no records returned, and like current one is the new one.
>
> So, how can I achieve my goal? Please help :)
>
> Thnx for your time,
> Oxy-

If you have a Parameterised view then the Parameter(s) must exists before you call the view in oder to stop Foxpro Prompting for the value.

In your case you would code :

Private p_CompanyID

p_CompanyID = Thisform.company_id
Use MyRemoteView in 0

Regards

Yu-Wah

ENTIRE THREAD

Pass a parameter to remote view when creating form Posted by Oxy- @ 10/1/2002 4:14:19 PM
RE: Pass a parameter to remote view when creati... Posted by Yu-Wah Cheung @ 10/2/2002 6:30:04 PM
RE: Pass a parameter to remote view when creati... Posted by Oxy- @ 10/3/2002 2:52:21 PM
RE: Pass a parameter to remote view when creati... Posted by Oxy- @ 10/3/2002 3:28:29 PM