Solved

VB6 code opening specific record from flexgrid

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

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…
Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
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…
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…

863 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

26 Experts available now in Live!

Get 1:1 Help Now