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

Grid issue 1

Status
Not open for further replies.

tforr

Programmer
Aug 14, 2003
181
GB
Hi there,

I have created a form that has a one to many relationship. (one customer will input many audit details). When I select my "new record" button, a unique ID is created i.e. 100001 and I can begin to input details within this record.
The uniqie ID is not shown on my grid so when the "new record" button is selected I cannot tell whether or not I can start inputting data. I would like to know how the relevant field can be highlighted for inputting.

Can anyone help,

Thanks in advance,

Tom
 
Tom

Perhaps faq184-1264?

Mike Gagnon

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

Do you mean that the unique ID is present in the grid, but not visible -- in other words, you need to scroll to reach it?

If so, you can call the grid's DoScroll method to scroll it programmatically.

Mike


Mike Lewis
Edinburgh, Scotland

My Visual Foxpro web site: My Crystal Reports web site:
 
Yes I think so. Basically at the moment when I click on the new button the i.d increments by 1 but this is not displayed on my grid therefore it looks like nothing has happened. I have to manually click on the line in the grid to begin entering info. I want to try and find a way of the cursor automatically appearing on the new line of the record i.e. Equipment type field, I input Server.

Thanks Mike, hope this is clear

Tom
 
Hi Mike,

So will it be the setfocus procedure within the button command or the grid itself. Sorry Mike, I'm a little confused.

Regards,

Tom
 
Tom,

You need something like this:

THISFORM.Grid1.Setfocus

I would guess it would go in the Click of the New Record button, after the code that adds the new record and generates the ID.

Mike


Mike Lewis
Edinburgh, Scotland

My Visual Foxpro web site: My Crystal Reports web site:
 
Thanks for your time Mike. Much appreciated.

Regards,

Tom
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top