Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Flexgrid and a combobox

Posted on 2001-09-07
12
Medium Priority
?
578 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
U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

 
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 400 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: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

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

AutoNumbers should increment automatically, without duplicates.  But sometimes something goes wrong, and the next AutoNumber value is a duplicate.  This article shows how to recover from this problem.
If you need a simple but flexible process for maintaining an audit trail of who created, edited, or deleted data from a table, or multiple tables, and you can do all of your work from within a form, this simple Audit Log will work for you.
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

662 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