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

Pop-up Display of DBGrid Row

Status
Not open for further replies.

Linguist

Technical User
Jul 11, 2000
40
US
Background: I created a database using the DBGrid to display 6 fields of data. The user has to resize the columns in order to see all the text in each field.

Question: I would like to create a form that would pop-up when the user clicks on a row and display the data in each field of that row (and just that row) in corresponding text boxes on the pop-up form.

Thanks for your help.
-Linguist
 
Private Sub msflexgrid_EnterCell()
load form
If MSFlex.Rows >= 2 Then
Call NewCurrent
form.TxtCatNbr.Text =form.MSFlexGrid.TextMatrix(MSFlexGrid.Row, 1)

for every text field you want populated you will need
to do the above statement. The 1 is where the field
is in the row. So if you have a row containing six
fields you will do the above statement six times.

End If

Sub NewCurrent()
CRow = MSFlexGrid.Row
CCol = MSFlexGrid.col
With MSFlexGrid
.col = 0
.RowSel = .Row
.ColSel = .Cols - 1
End With
End Sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top