Solved

VB6 code opening specific record from flexgrid

Posted on 2009-06-29
1
474 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
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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

813 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now