Solved

Very Urgent - MSFlexiGrid

Posted on 1999-01-18
2
148 Views
Last Modified: 2010-05-03
I am using an MSFlexiGrid in my application.

I have the following problem with it and i am not in the position to purchase or use a different grid.

I am using the grid as a booking system viewer so that the user can see which rooms are booked and for what periods i.e AM, PM, FD (full day). The problem is that the user needs to be able to click on the booking and be able to view the appropriate booking record. Since i can only store the period in each cell it makes it difficult to find their record e.g. find all recs where period = AM (this would find many records). I have found a rowdata and coldata property but this only allows me to assign a booking code to a group of cells and not a single cell. If i could also assign the booking code to each single cell i could then simply search for the record using the booking code.

Does anybody know a way around this or any information on the subject?

Thanks in advance.
0
Comment
Question by:BobX
2 Comments
 
LVL 2

Accepted Solution

by:
dabellei earned 100 total points
ID: 1469150
msflexgrid1.row=0
msflexgrid1.col=0

text$ = msflexgrid1.text

This will give you the content of this particular cell.

to assign you do the reverse
msflexgrid1.text = text$


that's it..
0
 
LVL 18

Expert Comment

by:mdougan
ID: 1469151
If one row = one booking code then:

It sounds like you want to store the record key in the grid, but do not want the user to necessarily see the key?  What I do is to put the key in either the first (fixed) column (column 0) or I put it in the last column (MyGrid.Cols - 1).  If I put the key in the last column, then I usually set that column's width to zero so that the user will not see it.  Then, whenever your user clicks on a row, you can get the key using:

Dim sKey as string

    sKey = MyGrid.TextMatrix(MyGrid.Row, (MyGrid.Cols - 1))
or
    sKey = MyGrid.TextMatrix(MyGrid.Row, 0)

if you put the key in the first column.

Else if one Cell = one booking code, then one thought is that you could actually double up the number of columns in your grid, and make every even column number's width = 0.  In this cell, you could store your booking code for the cell to it's left.  Awkward, but it would work.

MD
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Share codes 68 114
Public Sub, Empty Cell 7 57
Copy a row 12 52
VB6 - Compare and highlight cell not the same 3 33
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…
Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
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…

707 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

13 Experts available now in Live!

Get 1:1 Help Now