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

FORM GRID HELP PLEASE 1

Status
Not open for further replies.

morlassino

IS-IT--Management
Jul 1, 2004
33
US
OK. I WILL TRY AND KEEP THIS AS BRIEF AS POSSIBLE. I HAVE A FROM WITH SEVERAL TEXT ENTRY BOXES AND A GRID BOX BELOW IT. I NEED THE BOXES ON TOP TO BE INSYNC WITH THE RECNO ON THE GRID TO ALLOW SEPERATE INFO. I.E. I NEED THE RECNO OF MY MAIN TABLE TO SAY BE ONE AND THE TABLE THAT IS SUPPORTING THE GRID BE ALSO ONE WITH MAY ENTRIES USING THE SAME ID NUMBER. I HAVE TRIED TO CREATE ALIAS' WITH NO LUCK
CAN ANY ONE STEAR ME IN THE RIGHT DIRECTION.
I HAVE ADDED A RECNO(0 HOLD TO THE INIT AND THEN CREATED AN ALIAS IN THE ACTIVATE NOTHING I HAVE CHANGED THAT A HUNDRED TIMES I AM REALLY LOST....THANK YOU TO ALL THAT CAN HELP
 


You might consider fixing your keyboard first, it seems to stuck on capital letters, which makes it seem like you are shouting. Next you may look at the help files under 'set skip to'.


Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
 
sorry for the caps...

MARIO P ORLASSINO
ASSISTANT MANAGER
HUNTINGTONCOACH CORP
"THE HOSE HEAD"
 
my code is as follows
SELECT RUN
SET ORDER TO RUNID
THISFORM.TEXT1.VALUE = RECNO()

SELECT STOPS
SET ORDER TO STOPS


SET FILTER TO ALLTRIM(STOPS.RUNID) = ALLTRIM(RUN.RUNID)
RUNREC = RECNO()
THISFORM.TEXT2.ValuE = RECNO()

THISFORM.GRID2.SETFOCUS
GOTO TOP
it works but not what i want it to do.....

i want to be able to have one runid have one name on the run(maintable) but on the stop table many entries this stop table is attached to a grid so that only those records that met the critea will show up in the grid

I am not sure if this makes sense at all.
i want to be a able to add a record to the main table and the grid boxes show only the stuff from that RECORD...
thank you


MARIO P ORLASSINO
ASSISTANT MANAGER
HUNTINGTONCOACH CORP
"THE HOSE HEAD"
 
morlassino

Create your form >
Add your table to the data environment >
Add a grid to it >
Add the text boxes to it >

In the grids Init procedure add this:

Code:
PUBLIC grno
grno = RECNO()

THIS.setall("Dynamicbackcolor", ;
  "IIF(RECNO()=grno,RGB(0,0,160),RGB ;
  (255,255,255))","Column")

THIS.setall("DynamicForecolor", ;
  "IIF(RECNO()=grno,RGB(255,255,255),RGB(0,0,0))","Column")

In the grids AfterRowColChange add this:

Code:
LPARAMETERS nColIndex
grno = RECNO()
THISFORM.Refresh()

Assuming this is what your looking for, you should end up with something like this each time you scroll through your records:

before.gif


And...

after.gif


Good luck
Lee

VisFox Version 6 User
 
that was a cool trick but not exactly what i was looking to do. I will explain it a bit better. I need to have a grid that shows only info from a cetain record in the main table. i.e. say record one id #10 has one entry but there is another table which is linked to that id #10 (on the main table) that filters the records on the grid to show only those records that match the main tables record.


MARIO P ORLASSINO
ASSISTANT MANAGER
"THE HOSE HEAD"
 
MARIO P ORLASSINO

Have you looked at 'set skip to' in the help file?, it should solve you problem.

Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
 
morlassino

I agree with Mike... Have you looked at 'set skip to' in the help file?, it should solve you problem

Good luck
Lee


VisFox Version 6 User
 
ok seems to be working thanks for the help everyone... but i have one more issue(actually probabley many more but one for now)
how can i edit straight in the grid and effect on that table...


MARIO P ORLASSINO
ASSISTANT MANAGER IT
"THE HOSE HEAD"
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top