Solved

Flexgrid and a combobox

Posted on 2001-09-07
12
575 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
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

 
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

Want Experts Exchange at your fingertips?

With Experts Exchange’s latest app release, you can now experience our most recent features, updates, and the same community interface while on-the-go. Download our latest app release at the Android or Apple stores today!

Question has a verified solution.

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

As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
This article describes two methods for creating a combo box that can be used to add new items to the row source -- one for simple lookup tables, and one for a more complex row source where the new item needs data for several fields.
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …

623 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