Solved

Flexgrid and a combobox

Posted on 2001-09-07
12
572 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
Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.

 
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

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

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

Suggested Solutions

Access custom database properties are useful for storing miscellaneous bits of information in a format that persists through database closing and reopening.  This article shows how to create and use them.
In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
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 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…

738 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