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!

Data from a grid to text boxes on another form

Status
Not open for further replies.

Jomercat

Programmer
Sep 1, 2004
100
US
Hi all,

I hope tha somebody can help me with this issue.

I want to populate the data from a specific grid column onto another form with text boxes.

Any help would be appreciated.

Jose.
 
This is quite easy. When you create the form make sure it has control sources that are the same as the grid. When you move the grid record it actually moves the record pointer in the database. When you open the form the record should be the same and therefore the info should be the same.

If that is not possible you have to create variables for each column and that can be a nightmare (I know).

Don Higgins
 
crewchiefpro6,

Thanks for the reply.

I meant to say data from a row onto text boxes of another form.

Could you provide a sample code?

Thanks.

Jose.
 
I assumed the row, since grids display rows of data :)

Create a form, you might want to use the form wizard for this also. Include the fields you want, and make sure they are the same control source database as the grid, whenever the grid moves so will the form since they are tied to the same information.

There really is not much code, the record movement does not require any, and the form will have none to speak of. The only code you will have to write is the double click event code on each of the grid columns (or a bind events code) that fires the form with this code:

do form whatever



Don Higgins
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top