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

Need Info On Validating Grid Entries 1

Status
Not open for further replies.

drosenkranz

Programmer
Sep 13, 2000
360
US
Hello,

We are establishing eligibility for a program. I have a large PageFrame with 4 pages. Page 2 has a grid for household members - each receives a unique ID number. We use 1 as the applicant, 2 would be a co-applicant if there is another adult, 3 would be the next household member - even if there was no co-applicant, 4 would be the next person in the household - etc.

Page 3 has two additional grids - one for Income(s) and the other for Resources. Each of these two grids has an ID field which points back to the household member's ID to whom it belongs back on Page 2.

My problem is two-fold.

1) First, since each individual household member's number is assigned on Page 2, how (and where) would I validate the user's Income and Resource Grid (ID field) entries on Page 3 actually refer BACK to a valid household member's ID on Page 2?

2) If a user decides to go back later and change a household member's ID, how would I get the Income and Resource Grid's ID fieldson Page 3 to automatically update when the household member's ID is changed on Page 2?

I originally open up all of my work areas from a .prg file and then call the Main form. The form uses the DataEnvironment with Row Buffering.

Thank you so much for your time and suggestions,

Dave

The 2nd mouse gets the cheese.
 
Hi

1. In page 3, I suggest, you dont ask for the Id. Instead ask for.. 1st person, 2nd person etc. And always take the ides from the Page2.controls.Value at the time of update.

2. Make the updates for all the pages together. So even when you update Page2 data, update page3 data also, using the person1, person2, person3, person4 references from Page2.

That way, it can be simplified.


Another comfortable way, will be, to have these Id numbers outside the Pageframe - at the top of Pageframe. That way this will be available for all pages for viewing and users will not make mistake.

:)

ramani :)
(Subramanian.G)
 
Hi Ramani,

Thanks for the response. I like the idea for the names displayed but I've got tons of stuff on this PageFrame and no where to display the list. I was thinking about using a cmdADD button to open a mini-form with a grid of household member ID's and names and have the user will click on the person (ID) that they want. I'd keep the ID field in the grids on page 3 as read only. This takes care of ensuring that they enter a valid household member's ID number.

But how about the second problem... going back to Page 2 and changing the household member's ID needs to update any Income and Resource records in the grids on Page 3 with the household member's "new" ID.

How (and where) would I put the code in the household member's grid on Page 2 to update the grids on Page 3?

Thanks,

Dave

The 2nd mouse gets the cheese.
 
When you accept the Id in page2, along with it, keep a column reference as 1,2,3 or 4. Then when the id# is validated on entry, write the code along with it to change the matching 1 or 2 or 3 or 4 th persons ID in page 3 also changed.

OR

Whenyou accept the id# in page2, in the got focus, capture the current Id, and in the valid or lost focus, change the page#3's ID number to the newId .. for existing id = captured Id in the gotfocus.

:)



ramani :)
(Subramanian.G)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top