HELP HELP HELP HELP

HELP HELP HELP HELP

Post by CNT » Fri, 30 Jun 2000 04:00:00



I didn't want to use this like that for the subject, but what else would
I get your attention, sir?

FPW 2.6

The following are the coding (again, for FPW 2.6) and it works:
**************************************************
CLOSE ALL
CLEAR

USE person IN 0 ORDER ID
USE auth IN 0 ORDER ID

SELECT person
SET RELATION TO id INTO auth
BROWSE NOWAIT
SELECT auth
BROWSE NOWAIT

*DO authmain.spr
**************************************************

But, how to do that in a screen, via in authmain.spr? I want to set this
up so that the parent is in the main screen and the child in "grid"-like
WITHIN the screen itself? The reason I can not use "listbox" because I
need to be able to do edits... I know this is old, but can you help? I
am trying to avoid "SET FILTER TO" because this would make it very slow.
Any idea and please help. Thank you.

Chuck

 
 
 

HELP HELP HELP HELP

Post by MAppell9 » Fri, 30 Jun 2000 04:00:00


Try select SQL or create a temp dbf file.

>Subject: HELP HELP HELP HELP

>Date: 6/29/00 7:51 AM Pacific Daylight Time

>I didn't want to use this like that for the subject, but what else would
>I get your attention, sir?

>FPW 2.6

>The following are the coding (again, for FPW 2.6) and it works:
>**************************************************
>CLOSE ALL
>CLEAR

>USE person IN 0 ORDER ID
>USE auth IN 0 ORDER ID

>SELECT person
>SET RELATION TO id INTO auth
>BROWSE NOWAIT
>SELECT auth
>BROWSE NOWAIT

>*DO authmain.spr
>**************************************************

>But, how to do that in a screen, via in authmain.spr? I want to set this
>up so that the parent is in the main screen and the child in "grid"-like
>WITHIN the screen itself? The reason I can not use "listbox" because I
>need to be able to do edits... I know this is old, but can you help? I
>am trying to avoid "SET FILTER TO" because this would make it very slow.
>Any idea and please help. Thank you.

>Chuck

Mike

 
 
 

HELP HELP HELP HELP

Post by CNT » Fri, 30 Jun 2000 04:00:00


That does not tell me anything.

I have noticed that there is BROWSE [IN WINDOW] and [IN SCREEN] but I don't
know how to use it. I tried it in the Windows Setup but not right...

Chuck

Quote:> Try select SQL or create a temp dbf file.

 
 
 

HELP HELP HELP HELP

Post by CNT » Fri, 30 Jun 2000 04:00:00


This is an document that no longer exist in KB of MS site. I still don't
understand this!

======================================================================
ID: Q97640 - Combining GET Fields and a Browse in a Single Window
======================================================================
----------------------------------------------------------------------------

---
The information in this article applies to:

 - Microsoft FoxPro for Windows, versions 2.5x, 2.6, 2.6a
 - Microsoft FoxPro for MS-DOS, versions 2.0, 2.5x, 2.6, 2.6a
 - Microsoft FoxPro for Macintosh, versions 2.5x, 2.6a
----------------------------------------------------------------------------

---

SUMMARY
=======

Although the FoxPro Screen Builder allows a data input screen to be combined

with a separate Browse window, the GET fields of the data input screen and
the
information in the Browse window cannot be combined in a single window.
However,
the screen can be programmed so that the GET fields and the browse
information
appear to be in a single window, as explained below.

NOTE: For a more complete description of combining a Browse window with GET
fields, please refer to Application Note FW1125.

For a description of Application Note FW1125 and how to obtain it, please
see the
following article in the Microsoft Knowledge Base:

   Q124606 SAMPLE: Fw1125.exe Combines a Browse Window with Get Fields

MORE INFORMATION
================

This example uses GET fields from the CUSTOMER.DBF table in conjunction with

a
browse of related records in the INVOICES.DBF table. It is assumed that the
CUSTOMER.DBF and INVOICES.DBF tables have been installed in the TUTORIAL
subdirectory in the main FoxPro directory.

The steps below create three windows:

 - Window #1, called WBIG, is a large window with a border that acts as a
visual
   frame around the GET screen and the Browse window.

 - Window #2, called WGETS, contains GET fields and push buttons. It does
not
   have a border.

 - Window #3, called WBROWSE, contains the browse information of the
invoices
   records found in the INVOICES table.

NOTE: The actual screen coordinates of the windows matter only insofar as
WGETS
and WBROWSE are contained within WBIG.

Create the Screens
------------------

To create these windows using the Screen Builder power tool, do the
following:

1. In the Command window, type "CREATE SCREEN getbrow" (without the
quotation
   marks) to create a screen using the Screen Builder.

2. From the Screen menu, choose Quick Screen. When prompted, select
CUSTOMER.DBF
   from the <FoxPro_directory>\TUTORIAL subdirectory, then choose Open.

3. In the Quick Screen dialog box, select the Fields check box.

4. Move CNO and COMPANY to the Selected Fields list box. Choose OK twice to
   return to the Screen Design window.

   NOTE: Because the WGETS window will be defined as eight lines high, these

   fields should be located in the first eight rows of the screen. If fields

are
   defined beyond this point, a "Position off screen" error will be
generated
   when the .SPR file is run.

5. FOXPRO FOR WINDOWS & FOXPRO FOR MACINTOSH: From the Screen menu, choose
   Layout. In the Name text box, type "WGETS" (without the quotation marks)
for
   the screen name. Do NOT choose OK yet.

   FOXPRO FOR MS-DOS: From the Screen menu, choose Screen Layout. Select the

   Window option button at the top of the dialog box. In the Name text box,
type
   "WGETS" (without the quotation marks) for the screen name. Do NOT choose
OK
   yet.

6. FOXPRO FOR WINDOWS & FOXPRO FOR MACINTOSH: Under Options, choose the Code

   button.

   FOXPRO FOR MS-DOS: Skip to step 7.

7. FOXPRO FOR WINDOWS & FOXPRO FOR MACINTOSH: Choose both the Screen Setup
   Code and Cleanup And Procedures buttons. Choose OK twice.

   FOXPRO FOR MS-DOS: Under Screen Code, choose both the Setup and Cleanup &

   Procs check boxes. Choose OK once.

8. Locate the "getbrow - Setup" editing window and type the following code
in
   it:

          CLOSE DATABASES
          SELECT 1
          USE SYS(2004)+"\TUTORIAL\customer.dbf"
          * SYS(2004) Returns the name of the directory that
          * FoxPro was started from.
          SELECT 2
          USE SYS(2004)+"\TUTORIAL\invoices.dbf"

          SET SAFETY OFF  && Prevents error message if tag already exists.
          INDEX ON cno TAG cno ADDITIVE
          SET SAFETY ON

          SELECT 1
          SET RELATION TO cno INTO invoices ADDITIVE
          SET SKIP TO invoices  && Establishes one-to-many relationship.

          DEFINE WINDOW wbig FROM 1,1 TO 22,80 DOUBLE
          DEFINE WINDOW wgets FROM 0,5 TO 8,75;
             IN WINDOW wbig NONE
          DEFINE WINDOW wbrowse FROM 9,0 TO 20,80;
             IN WINDOW wbig NONE

          ACTIVATE WINDOW wbig
          SELECT invoices
          ACTIVATE WINDOW wbrowse
          BROWSE WINDOW wbrowse IN WINDOW wbig SAVE NOWAIT
          SELECT customer
          ACTIVATE WINDOW wgets

9. Type the following code in the "getbrow - Cleanup" editing window:

          RELEASE WINDOW wbig, wbrowse

10. From the Program menu, choose Generate.

11. When prompted to save changes to the file, choose Yes.

12. When prompted to save environment information, choose No.

   NOTE: The environment is controlled by the code in "getbrow - Setup" in
Step
   8.

13. FOXPRO FOR WINDOWS & FOXPRO FOR MACINTOSH: In the Generate Screen dialog

   box, choose the More button.

   FOXPRO FOR MS-DOS: Skip to step 14.

14. Clear the Define Windows check box, then choose Generate.

To run the program, type "DO getbrow.spr" (without the quotation marks) in
the
Command window.

NOTE: No records are displayed in the Browse window of this example because
the
first record in the CUSTOMER table doesn't have any related INVOICES
records. To
move through the tables so that you can see other records, add the control
buttons described in the next section.

Control Buttons
---------------

To create push buttons to move forward or backward through the tables, or to

close the screen, perform the following steps:

1. Type "MODIFY SCREEN getbrow" (without the quotation marks) to open the
   screen.

2. To place a push button object on the screen immediately below the COMPANY

GET
   field, do one of the following:

   FOXPRO FOR WINDOWS & FOXPRO FOR MACINTOSH: From the toolbox, choose the
   push button tool. Click the area directly below the COMPANY GET field to
   place the push button object.

   FOXPRO FOR MS-DOS: From the Screen menu, choose Push Button.

   NOTE: The push button object must not overlap the areas used by the WGETS

or
   WBROWSE windows.

3. Under Push Button Prompts, type "Next", "Prior", and "Quit" (without the
   quotation marks) on separate lines. In the Variable text box, type
"BUTVAL"
   (without the quotation marks). Do NOT choose OK yet.

4. FOXPRO FOR WINDOWS & FOXPRO FOR MACINTOSH: Under Clauses, choose the
   Valid button.

   FOXPRO FOR MS-DOS: Under Options, select the Valid check box.

5. Verify that the Procedure option button is selected, then type the
following
   code in the text box:

         SELECT customer
         SET SKIP TO  && Removes one-to-many relationship so that the SKIP
                      *  statement below doesn't move through the INVOICES
                      *  records.
         DO CASE
           CASE butval =  1
             IF (!EOF())
               SKIP 1
             ENDIF
           CASE butval = 2
             IF (!BOF())
               SKIP - 1
             ENDIF
           CASE butval = 3
             CLEAR READ
         ENDCASE

         SET SKIP TO invoices  && Reestablishes one-to-many relationship.
         SHOW GETS

6. Choose OK twice to return to the Screen Design window.

7. FOXPRO FOR WINDOWS & FOXPRO FOR MACINTOSH: Skip to step 8.

   FOXPRO FOR MS-DOS: Drag the push button to a location immediately below
the
   COMPANY GET field.

8. Generate the code for the screen again. Be sure to clear the Define
Windows
   check box.

NOTE: Not all CUSTOMER records have corresponding INVOICES records. Also,
note
that "Atec Data Service" is the first CUSTOMER record that has multiple
related
INVOICE records.

Switching Between the Screens
-----------------------------

Two keyboard methods can be used to switch between the Browse window and the

GET
screen:

 - CTRL+F1 can be used to cycle through any open windows. To use this
keyboard
   shortcut, the FoxPro system menu, or a menu using the system menu bar
   _MWI_ROTAT with a shortcut key of CTRL+F1, must be currently defined in
   memory. The menu must be accessible by setting SYSMENU to ON or
AUTOMATIC. If
   other windows are currently open, pressing CTRL+F1 may cycle through
these
   unrelated windows.

   -or-

 - An ON KEY LABEL command can be defined to switch between the two windows.

To
   define this command, do the following:

   a. Type "MODIFY SCREEN getbrow" (without the quotation marks) to open the

      screen.

   b. From the Screen menu, choose Open All Snippets.

   c. Locate the "getbrow - Setup" editing window, then add the following as

the
      first two lines of code:

            SET SYSMENU ON               && Enables CTRL+F1 to switch.
            ON KEY LABEL F2 DO switchwin && Enables F2 to switch.

   d. In the "getbrow - Cleanup" editing window, add the following as the
last
      lines of code:

            ON KEY LABEL F2  && Clear the F2 key when done.

            PROCEDURE switchwin
            IF WONTOP('WGETS')
               SELECT customer
               ACTIVATE WINDOW wbrowse
               BROWSE WINDOW wbrowse IN WINDOW wbig SAVE NOWAIT
            ELSE
               SELECT invoices
               ACTIVATE WINDOW wgets
            ENDIF

   e. Generate the code for the screen again. Be sure to clear the Define
      Windows check box.

In this example, the F2 key is used to switch between windows using the
procedure
SWITCHWIN. This procedure determines which window is currently the active ...

read more »

 
 
 

HELP HELP HELP HELP

Post by NG » Sat, 01 Jul 2000 04:00:00


Quote:> ======================================================================
> ID: Q97640 - Combining GET Fields and a Browse in a Single Window
> ======================================================================

You need to to use the inbrowse driver with genscrnx.     There are usually
sample programs with inbrowse that show you how to use this driver.   It
will allow you to draw a box on the screen, enter commands in the comment
box of that object and then create the browse during screen generation along
with the normal screen get fields

Regards
Al

 
 
 

1. help,help,help,help,help,help,help,help,help,help,help,help,help,

Hi,
I have a small problem, and if you know the answer I would really be
thankful for your help.
I have an access database which is called "Client.mdb"
on a form, I displayed a dbcombox for the costumer's name
a textbox for the address
a textbox for the city
a textbox for the state
and a textbox for the zipcode

on all my textboxes and the dbcombobox I have set their Datasource and
Datafield properties to Data1,
when I run the program the information on the first record of the data shows
on the form,

but what I need to do is, when I change the costumer's name on the
dbcombobox (which displays all of the costumer's names on it) I want the
textboxes to show the address, city, state, and zipcode of the costumer I
have choosen,

Thank you in advance,
Enrique G Lugo

2. Layout Bug... anyone else seen this?

3. help help help help help help help help help

4. MySQL, MyODBC, Access, and the frustration therein...

5. Help,Help,Help,Help,Help,Help,Help,Help,Help,Help,Help,Help,Help,Help,Help,Help,Help,Help,

6. Viewing the event log

7. SQL To ORACLE Help Help Help Help Help

8. Can't access newly created field !! HELP !!

9. query:HELP! HELP HELP HELP HELP

10. Help help help help

11. HELP HELP HELP HELP!

12. HELP HELP HELP HELP ... VB4(16) -> VB4(32)

13. HELP HELP HELP