Solved

VB6 code opening specific record from flexgrid

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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
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 …
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…

840 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