Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Browse window need help!!

Status
Not open for further replies.

alatp

Programmer
Joined
Jun 20, 2002
Messages
3
Location
CA
Hi,
Suppose that the follow data are in a browse window:
ABCD
ACCD
BEDF
BFGC
CHJK
I have use a select statement to select this field into a temp table, and i use the following code to display in a browse window.

ON KEY LABEL ENTER KEYBOARD "{CTRL+W}"
BROWSE fields phone : R title "Select Phone Number and press ENTER when done..."
ON KEY LABEL ENTER

After the browse window pop up it's point to [ABCD], the thing i wish to do is when I press B the record will point to [BEDF] and when I press A it'll point back to [ABCD] and so on.

Can anyone give me any hint to do this?
Thanks in advance.
 
create a form and put a combo box on the form with the control source = to the query. selec the property for sequential search. Attitude is Everything
 
alatp

Untried, but you could set the .KeyPreview property of the form to .T. and in the .KeyPress() event of the form place the code required for the search. HTH

Chris [pc2]
 
Hi all,
Thanks for the reply first.
I think I need to make it more clear that I need to do this INISIDE the browse window, for example if anyone have use SBT before will know what I mean. In SBT inside a form user can press a browse button and a browse window will pop up on top. When the user press any A,B,C...etc button then record pointer will point to the corresponding record, just as I describe above.

Thanks for the input again.
 
alatp

Why are you using a browse window?

If you used a textbox and a grid, by setting focus to the textbox you could perform an incremental search on the grid, with the benefit of the user seeing the characters as they were typed.

In the .KeyPress() event of the textbox, you could use IF nKey = 13 etc to select the record. HTH

Chris [pc2]
 
alatp

Like Chris says, use a grid. I have a feeling that SBT uses a grid also (I have SBT version 5.0 at work, althought I'm not sure which module you are refering to, since I don't use it). Use a grid with the ability to do an incremental search in it, like described in FAQ184-1214. Mike Gagnon
 
Hi alatp,

Change your code...
ON KEY LABEL ENTER KEYBOARD "{CTRL+W}"
to

ON KEY LABEL ENTER KEYBOARD CHR(23)
[COLOR=/]

Hope this solves your problem :-) ramani :-)
(Subramanian.G),FoxAcc, ramani_g@yahoo.com
 
ON KEY LABEL A DO P1
ON KEY LABEL B DO P1
...
ON KEY LABEL Z DO P1

BROWSE
ON KEY

PROC P1
R=IIF(EOF(),0,RECNO())
LOCATE FOR FILENAME=CHR(LASTKEY())
IF EOF()AND R>0
GO TOP
ENDIF
ENDPROC
 
Sorry, here is an improvevent:

PROC P1
R=IIF(EOF(),0,RECNO())
CCOL=VARR()
LOCATE FOR &CCOL=CHR(LASTKEY())
IF EOF()AND R>0
GO TOP
ENDIF
ENDPROC
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top