Solved

Flexgrid and a combobox

Posted on 2001-09-07
12
560 Views
Last Modified: 2008-03-06
I am using Access 97 in Windows 98 environment. I have put a MSflexgrid control on the screen. I have a column that I want to use a combobox to input data into. Everything is built, and all seems to work except the combo box.

When I click on a cell in the MSflexgrid, the code executes to put the combobox on the screen. No combo box appears, but if I click on another cell, I get a value must be chosen from the list error and then the list from the combo box apears with no combo box below the original cell that I had chosen. Am I missing something here. Any suggestions. Anybody try to do this before in Access?

0
Comment
Question by:lyners
  • 5
  • 4
  • 2
  • +1
12 Comments
 
LVL 6

Expert Comment

by:PsychoDazey
ID: 6464760
Try to set the visible property to true in your code:
me.[comboboxName].Visible = True...
If this doesn't work, can you post the code?
0
 
LVL 1

Author Comment

by:lyners
ID: 6464769
Here is the code. I set visible to true so I can move the combo box over the grid space.

  Private Sub MSFlexgrid1_Click()
          With MSflexgrid1
              Combo1.Visible = True
              Combo1.SetFocus
              Combo1.Left = .CellLeft
              Combo1.Top = .CellTop
              Combo1.Width = .CellWidth
              Combo1.Height = .CellHeight
              Combo1.DefaultValue = .TextMatrix(.Row, .Col)
              DoEvents
          End With
   
    End Sub
0
 
LVL 6

Expert Comment

by:PsychoDazey
ID: 6464803
0
 
LVL 6

Expert Comment

by:PsychoDazey
ID: 6464811
Another thought - did you try activating the cell you are trying to put the combobox in first?
Heres another article:
http://support.microsoft.com/support/kb/articles/Q179/7/59.ASP?LN=EN-US&SD=gn&FR=0&qry=MSFlexGrid&rnk=10&src=DHCS_MSPSS_gn_SRCH&SPR=MSALL
0
 
LVL 1

Author Comment

by:lyners
ID: 6464865
My Data Control is not bound. I populate the grid with data I get from a SQL statement.

0
 
LVL 6

Expert Comment

by:PsychoDazey
ID: 6464947
Alright, I'll keep thinking on this one...
0
What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

 
LVL 8

Expert Comment

by:dovholuk
ID: 6464952
i'm confused. why are you using a flexgrid? does it have some special functionality you are looking for?

just wondering...

dovholuk
0
 
LVL 8

Expert Comment

by:dovholuk
ID: 6464985
i'm confused. why are you using a flexgrid? does it have some special functionality you are looking for?

just wondering...

dovholuk
0
 
LVL 1

Author Comment

by:lyners
ID: 6465076
Basically I am giving a user a Spreadsheet like view, with totals, sub totals, merged cells, etc. I thought about using a subform in a datasheet view, but I will not get be able to merge cells, etc. The whole reason for using a flexgrid is to give the user a very "flexible" view of their data so that they can analyze it and make good decisions. Like I said, I have everything working great right up to the combo box entry.


0
 
LVL 6

Expert Comment

by:PsychoDazey
ID: 6465260
Did you think of using a continuous form in Datasheet  view?
0
 

Accepted Solution

by:
mphel earned 100 total points
ID: 6465394
I had the same problem when I tried to use a flexgrid and the built-in MS Access textbox control.  The textbox would never show on top of the flexgrid. I think Access built-in controls will not show up on top of ActiveX controls.  If you are using the MS Access combobox, you need to instead use the Microsoft combobox ActiveX control.  Of course, the ActiveX control combobox is not as easy to work with as the Access version. I think you need to make Windows API calls to do things such as incremental searches.  All in all, I abandoned my flexgrid in Access - it turned out to just be too much code and trouble.
0
 
LVL 1

Author Comment

by:lyners
ID: 6465697
I was just about to post a coment saying that my combo boxes work, I just can't get them above the flexgrid control when mphel put the answer in. It appears that in Access, Access Controls cannot appear above the Flexgrid control. To remedy this, you must use ActiveX comboboxes, etc.

Thanks for the advise!
0

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

In the previous article, Using a Critera Form to Filter Records (http://www.experts-exchange.com/A_6069.html), the form was basically a data container storing user input, which queries and other database objects could read. The form had to remain op…
In a multiple monitor setup, if you don't want to use AutoCenter to position your popup forms, you have a problem: where will they appear?  Sometimes you may have an additional problem: where the devil did they go?  If you last had a popup form open…
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…

744 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