Click here to Skip to main content
15,905,028 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralBinding objects - Error Pin
ibok2329-Mar-04 8:55
ibok2329-Mar-04 8:55 
GeneralRe: Binding objects - Error Pin
ibok2329-Mar-04 14:08
ibok2329-Mar-04 14:08 
Generalselecting a data in flexgrid Pin
GaryKoh29-Mar-04 5:43
GaryKoh29-Mar-04 5:43 
GeneralRe: selecting a data in flexgrid Pin
superwinsock29-Mar-04 23:49
superwinsock29-Mar-04 23:49 
GeneralRe: selecting a data in flexgrid Pin
GaryKoh30-Mar-04 0:44
GaryKoh30-Mar-04 0:44 
GeneralRe: selecting a data in flexgrid Pin
superwinsock30-Mar-04 1:15
superwinsock30-Mar-04 1:15 
GeneralRe: selecting a data in flexgrid Pin
GaryKoh30-Mar-04 2:11
GaryKoh30-Mar-04 2:11 
GeneralRe: selecting a data in flexgrid Pin
superwinsock30-Mar-04 3:12
superwinsock30-Mar-04 3:12 
Hey Gary

Ok... Once you have populated your flexgrid:

You will select a row of data by clicking on the flexgrid row.
Then(just as example) you have a command button called cmdENTER.

When you have selected a row and then click cmdENTER,
you put the selected rows information in an array called strCustData.
It has been dimentioned to (0 to 12) because there are 13 columns in my
row.

'So this code will go in the same form as your selected flexgrid

'Copy this code into VB, it will be easier to read

Private sub cmdENTER_Click()

Dim strCustData(0 To 12) As String
Dim lngClientId As Long
Dim bytCount As Byte

With grdClients
'This just checks if a valid record was selected
If .TextMatrix(.Row, 0) = "" Or .TextMatrix(.Row, 1) = "N/A" Then
MsgBox "Please Select a Record"
Exit Sub

Else
'Sets my variable to the first column's value of the selected row
lngClientId = .TextMatrix(.Row, 0)

'here we assign the rows values to our array
For bytCount = 0 To UBound(strCustData, 1)
strCustData(bytCount) = .TextMatrix(.Row, bytCount + 1)

Next bytCount

End If

End With


'Now we call our next form where you want the selected row's data
' to be displayed

'Load the form
Call Load(frmUpdate)

With frmUpdate
'Then in frmUpdate create a Public Sub call MP_ClientDetails
'and here we call that Sub and pass through our array
'strCustData)
.MP_ClientDetails lngClientId, strCustData
.Show vbModal

End With

End Sub


'Here is the code for that Public Sub which should be in frmUpdate

Public Sub MP_ClientDetails(lngClientId As Long, strCustData() As String)

Dim bytCount As Byte

'Here we assign the values from our Array into the textboxes on
'frmUpdate (Obviously this could be changes to a grid or ??)

For bytCount = 0 To UBound(strCustData, 1)
txtCustDetails(bytCount).Text = strCustData(bytCount)

Next bytCount

End Sub

I really suck at explaining things but hope this helps a little.
If confusion reigns just tell me and I will try explain in a different way

Regards
Cliff
GeneralRe: selecting a data in flexgrid Pin
GaryKoh31-Mar-04 16:17
GaryKoh31-Mar-04 16:17 
Questiondoable in .net? Pin
KamWaf29-Mar-04 5:31
KamWaf29-Mar-04 5:31 
AnswerRe: doable in .net? Pin
Zlosk29-Mar-04 6:03
Zlosk29-Mar-04 6:03 
GeneralRe: doable in .net? Pin
KamWaf29-Mar-04 7:32
KamWaf29-Mar-04 7:32 
GeneralVB6 date vs SQL Server date Pin
gpa200029-Mar-04 2:13
gpa200029-Mar-04 2:13 
GeneralRe: VB6 date vs SQL Server date Pin
Anonymous29-Mar-04 7:47
Anonymous29-Mar-04 7:47 
GeneralRe: VB6 date vs SQL Server date Pin
Guerven30-Mar-04 1:44
Guerven30-Mar-04 1:44 
GeneralRe: VB6 date vs SQL Server date Pin
gpa200030-Mar-04 12:33
gpa200030-Mar-04 12:33 
GeneralRe: VB6 date vs SQL Server date Pin
jonathan151-Apr-04 3:28
jonathan151-Apr-04 3:28 
GeneralFTP address decode from packet Pin
Anoop Kumar28-Mar-04 23:59
Anoop Kumar28-Mar-04 23:59 
GeneralReverse engineering Pin
Emma S28-Mar-04 22:18
Emma S28-Mar-04 22:18 
GeneralRe: Reverse engineering Pin
Colin Angus Mackay29-Mar-04 0:06
Colin Angus Mackay29-Mar-04 0:06 
GeneralRe: Reverse engineering Pin
Dave Kreskowiak29-Mar-04 1:52
mveDave Kreskowiak29-Mar-04 1:52 
GeneralCustom Control UI Pin
Guerven28-Mar-04 22:14
Guerven28-Mar-04 22:14 
GeneralRe: Custom Control UI Pin
Dave Kreskowiak29-Mar-04 2:05
mveDave Kreskowiak29-Mar-04 2:05 
GeneralRe: Custom Control UI Pin
Guerven30-Mar-04 1:40
Guerven30-Mar-04 1:40 
GeneralBinding Objects Pin
ibok2328-Mar-04 16:02
ibok2328-Mar-04 16:02 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.