Data Access Worldwide Knowledge Base

Article ID 2153
Article Title HOWTO: Send the cursor back to a form
Article URL http://www.dataaccess.com/kbasepublic/KBPrint.asp?ArticleID=2153
KBase Category VDF (GENERAL)
Date Created 08/01/2005
Last Edit Date 08/01/2005


Article Text
QUESTION:
I would like to send the cursor back to a dbform on the view after the button is pressed and Check_Info_Typed returns False. I am using the code below:

Procedure OnClick
   string sStatus
   boolean bRetVal

   get value of oMyDBFormObject to sStatus

    if (sStatus) begin
       Get Check_Info_Typed sStatus to bRetVal
       if (not(bRetVal)) begin
            send activate of oMyDBFormObject
            procedure_return
       end
       else begin
            // do something when bRetval is true
       end
    end
end_procedure

Is it correct? Is it the way to do it?

ANSWER:
Your method is the way I do it and it works.  If the dbform is in a TabPage and it is different from that of the button, you need to switch to that TabPage and then activate the dbform.



Contributed By:
Sam Neuner
email: samn@mindspring.com

Web Links Related to this Article
DAW Knowledge Base article 1276: HOWTO: Programmatically activating a view
URL=http://www.dataaccess.com/KBPrint.asp?ArticleID=1276

DAW Knowledge Base article 142: HOWTO: Starting Views Automatically At Program Startup
URL=http://www.dataaccess.com/KBPrint.asp?ArticleID=142

DAW Knowledge Base article 774: Activating a view via a variable
URL=http://www.dataaccess.com/KBPrint.asp?ArticleID=774


Email this Article
Email this Article to a Colleague
Send Feedback on this Article to Data Access Worldwide
Copyright ©2010 Data Access Corporation. All rights reserved.

The information provided in the Data Access Technical Knowledge Base is provided "as is" without warranty of any kind. Data Access Corporation disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. In no event shall Data Access Corporation or its suppliers be liable for any damages whatsoever including direct, indirect, incidental, consequential, loss of business profits or special damages, even if Data Access Corporation or its suppliers have been advised of the possibility of such damages. Some states do not allow the exclusion or limitation of liability for consequential or incidental damages so the foregoing limitation may not apply.