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

Displaying a form

Status
Not open for further replies.

EscapeUK

Programmer
Jul 7, 2000
438
0
0
GB
New to VB

What I have are two forms one displaying a list of calls. What i want to happen is that when i select one of the items in the grid and press a button another form is displayed and its fields populated with data from the selected row on the grid.

eg

Form is displayed and a row is selected that contains

Name (John) LastName(Brown) Age (22)

the button is press and anther form is displayed and the fields on it are populated with
Name (John)
lastName(Brown)
Age(22)
 
From what I'm getting about your post, would it not be easier to show Form1 when a user double clicks on the grid, and Forms two when they press the button?


or if you are useing two buttons.. just set each button to show a differant form?
---===///The PogoWolf\\\===---
Darkness..Bleakness..Plastic forks..?

 
If i understand what you want to do, you want to show data in a grid and allow the user to modify data by pressing on a button.

Maybe you can try this if you are using a grid bound to a data source:

form2:
private sub form_load()
txtName = form1.dbgrid1.columns(0).value
txtLastName = form1.dbgrid1.columns(1).value
txtAge = form1.dbgrid1.columns(2).value
end sub

Hope it can help :)
good luck, grids are not easy to use
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top