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!

Grid + EditBox

Status
Not open for further replies.

sheronne

Programmer
Jun 1, 2001
71
US
I have a table that has the following fields From, Subject, Date, Comment. Comment is a memo field, date is well of course a date field and the other two are character fields.

The grid consists of the From, Subject, and Date. I want to list the comment in the Edit box below the grid. I have it setup; however, there can be multiple entries in the grid. As the user moves between the fields I need the editbox to change displaying the appropriate memo field.

It is not working. I have tried using "Thisform.edtComment.Refresh()" in the grid click method, I have also tried "Thisform.edtComment.SetFocus" as well as the combination of the two.

What am I doing wrong?

Thanks again.
 
HI
In the AfterRowColCHange Event... put the code..
Thisform.edtComment.Refresh
Hope this helps you :) ramani :)
(Subramanian.G),FoxAcc, ramani_g@yahoo.com
 
Ramani,

When I put that snippet in there, I get an "Unknown member EdtComment" error.

 
Hi,
That means your edit box name is wrong. Look into the property sheet of your edit box in the form. If that edit box is over a pageframe etc.. then give reference to that properly. So long the edit box name is correct, that shall work. I just copied the reference you have put in your question. What is the name given to your control? Use that name instead of 'edtComment' :) ramani :)
(Subramanian.G),FoxAcc, ramani_g@yahoo.com
 
I feel like such a putz for not referencing the pageframe. It worked. Thanks a bunch for your help.

One more question though, Why won't it fire from the click event of the grid?
 
Hi Sheronne,

I want to ask Ramani how do you up date text boxes above

a grid. They receive the transfer when I come from the previous form. I don't use this AfterRowColCHange Event
to do the same? It does not seem so. Question?

jonezbuz@aol.com
 
sheronne,
It needs to fire from the Click event of the current control of a column within a grid, such as 'Text1'. Since the grid is a container of all the header, text, edit, etc. controls, it doesn't really have focus when you click on it. The items contained within the grid do.

jonezbuz,
I'm not ramani, but maybe if you rephrase your question I can help. I'm not sure what you're saying.
Dave S.
 
HI Sheronne,
Dave is right. The click event of the grid wont fire, since you are clicking on the columns current control.. may be that is Text1 of ColumnN or Header1 of ColumnN. Hoever, the Grids click event will fire if the columns are absent and you click on the Grid Control.. normally.. when the Control Source is not yet defined. :) ramani :)
(Subramanian.G),FoxAcc, ramani_g@yahoo.com
 
Load the edit box in the grid's AfterRowColChange.

edtBox.value = tablefield.value - or some other process.

Darrell

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top