Solved

Flexgrid and a combobox

Posted on 2001-09-07
12
570 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

 
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
 
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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone 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

Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
It’s the first day of March, the weather is starting to warm up and the excitement of the upcoming St. Patrick’s Day holiday can be felt throughout the world.
Familiarize people with the process of utilizing SQL Server views 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 Access…
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…

735 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