Solved

VB6 code opening specific record from flexgrid

Posted on 2009-06-29
1
472 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
Comment Utility
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

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
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…

771 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

10 Experts available now in Live!

Get 1:1 Help Now