Browse/Popup (FoxPro 2.5b)

Browse/Popup (FoxPro 2.5b)

Post by Andrew Murdi » Fri, 18 Aug 1995 04:00:00



hello.

i am using foxpro for windows v. 2.5b and am a 1 month old foxpro programer
(i used to wright all my databases in C or Cobol).  I have a few simple
questions that i haven't found the solutions to yet.

1)  on appending in a browse window can i set default values and increment the
    value of my internal relational key?  

2)  on appending in a browse window (and/or in an input field) can i gain
    control after each key stroke (in a particular field) so i can do a
    seek and pull up the closest value to the key strokes entered so far?

    if this is impossible or entirely too much work (in the browser) that
    is it better to add to this file from another screen and just use the
    browse as a nifty way to display the data?

3)  regarding popups... i have a file that contains around 20,000 records and
    i wish to use a popup to allow the user to search a field.  up to now i
    have only gotten this to work by loading that field into an array.  
    obviously this array would be 20,000 long.  this wouldn't be that bad
    except it takes a fair amount of time to load up.  i was wondering if
    i could read from the file directly instead of from a pre-loaded array?

thank you for your patience and help.

dewey
--

 
 
 

Browse/Popup (FoxPro 2.5b)

Post by Paul Bro » Fri, 18 Aug 1995 04:00:00



>hello.

>i am using foxpro for windows v. 2.5b and am a 1 month old foxpro programer
>(i used to wright all my databases in C or Cobol).  I have a few simple
>questions that i haven't found the solutions to yet.

>1)  on appending in a browse window can i set default values and increment
the
>    value of my internal relational key?  

>2)  on appending in a browse window (and/or in an input field) can i gain
>    control after each key stroke (in a particular field) so i can do a
>    seek and pull up the closest value to the key strokes entered so far?

>    if this is impossible or entirely too much work (in the browser) that
>    is it better to add to this file from another screen and just use the
>    browse as a nifty way to display the data?

>3)  regarding popups... i have a file that contains around 20,000 records
and
>    i wish to use a popup to allow the user to search a field.  up to now i
>    have only gotten this to work by loading that field into an array.  
>    obviously this array would be 20,000 long.  this wouldn't be that bad
>    except it takes a fair amount of time to load up.  i was wondering if
>    i could read from the file directly instead of from a pre-loaded array?

>thank you for your patience and help.

>dewey
>--


I can't resist! Your one month old and programming computers?! Man, I knew
kids picked up computers fast these days but.....

Seriously,

1. If you are programmatically appending just use REPLACE after the append.
Just calc the next value for your key and then go from there.

  Example:  APPEND BLANK
            REPLACE field1 WITH ...
            REPLACE field2 WITH ...
            REPLACE primekey WITH ...
            etc

If you're Appendig from the menu then you may need to add your own option
for append that makes your programmatic calls.

2. Personally, I thinks it's a pain the but and would use a list box,

3. Speaking of list boxes, they allow you to select a FIELDS option that
let's you build an expression from the fields in a table. Set your order and
the as the user scrolls it move thru the table. If you want to tie it to a
search field set the list box variable = to the expression value of the
current record.

Example:

  List box displays last+', '+first+' '+middle and uses the variable
  tListBox

  You have a seek box that let's the user enter a last name and performs a
  search (tSeekName).

  In the valid clause put the following code.

  = SEEK(tSeekName)
  tListBox = last+', '+first+' '+middle

This will seek the name entered and move the pointer in the list box to the
current record.

Hope this helps.
--
*****************************************************************

******************************** they just don't want us to     *
* Compuserve: 70702,2140       * find it."                      *
*****************************************************************

 
 
 

Browse/Popup (FoxPro 2.5b)

Post by RMorse06 » Mon, 28 Aug 1995 04:00:00



Quote:Murdick) writes:
>i am using foxpro for windows v. 2.5b and am a 1 month old foxpro

programer

WOW!!!  And I thought I started young!