Solved

VB6 code opening specific record from flexgrid

Posted on 2009-06-29
1
476 Views
Last Modified: 2013-12-25
I am using MS flexgrid in VB6 form.  The flexgrid is poulated from a Oracle recordset with information from three fields: catcode, candid, candinfo in that order. I know the code until this stage.  
Upon selecting a record from the flexgrid and double clicking it, I want the specific record to be opened with more information for editing.  For that, I need to capture information from two fields i.e. catcode and candid (both are number fields).
What is the VB6 code to capture information from those fields and which event should trigger the code
0
Comment
Question by:smanthanims
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 

Accepted Solution

by:
smanthanims earned 0 total points
ID: 24744116
I found a solution myself.
The name of the flex grid displaying all records is FGcandlist
I have defined two constants in public in the module, i.e pubcatcode, pubcandid
Upon selecting and clicking a record in the flexgrid, the following code captures the information from the two required fields for subsequent use.  For example, the form frmcandedit is based on a specific recordset obtained by querying using catcode and candid from the original recordset.
Private Sub FGcandlist_Click()
With FGcandlist
.Col = 0 'start from column 1
   pubcatcode = .Text
  .Col = 2
  pubcandid = .Text
End With

frmcandedit.Show
End Sub
0

Featured Post

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

697 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question