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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to avoid a browse window between clicking in a listbox and updating a grid 1

Status
Not open for further replies.

german12

Programmer
Nov 12, 2001
563
DE

I have a form with a list box populated with many last names (surnames) and a grid.
If I click on a last name in the list box, then
I want to see all people in the grid who have the same last name (with different first names).


Code:
*Click on a surname.
STORE Nachname TO mnachname


SELECT verwandte

thisform.TEXTGEBORENE.value = GEBORENE
thisform.TEXTGEBURT.value = GEBOREN
thisform.TEXTSTERBEDATUM.value = GESTORBEN
thisform.TEXTIMALTERVON.value = IMALTERVON
thisform.TEXTWAEREHEUTE.value = WAEREHEUTE
thisform.TEXTHINWEIS.value = HINWEIS

Thisform.label1.caption = "geborene"
Thisform.label2.caption = "Geburtsdatum"
Thisform.label3.caption = "Sterbedatum"
Thisform.label4.caption = "im Alter von:"
Thisform.label5.caption = "Alter"
Thisform.label6.caption = "Hinweis"

*Show a grid where all surnames and person are shown who own the same surname 


thisform.grid1.RecordSource = "select * from verwandte where nachname = mnachname"
thisform.grid1.RecordSourcetype = 4

*works - however I always see a Browse-Window before the grid is populated.
*Why?

How can I avoid that - before the form with the grid is shown, always a browse-window is visible?

Thanks
Klaus



Peace worldwide - it starts here...
 

change the statement

thisform.grid1.RecordSource = "select * from verwandte where nachname = mnachname"

to

thisform.grid1.RecordSource = "select * from verwandte where nachname = mnachname into cursor cursorname"

 
Thank you very much, mm000 !!
It can all be so simple, but only if you know how simple it is.

Greetings from Germany
Klaus


Peace worldwide - it starts here...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top