FlexGrid on a Form problems..

carter

New member
Local time
Today, 04:23
Joined
Oct 15, 2008
Messages
5
I am fairly new to access and I am having one heck of a time using the flexgrid. For some reason I cannot fill the data automatically each time a form loads with data from a simple query.

I have added the flexgrid control to the form, but from what I've been told I need to add the datasource. The problem is the Flexgrid does not have a datasource property.

I am using Access 2003, any help is greatly appreciated.

Thanks
 
Welcome aboard!

The control you are using is intended for use with VB rather than with Access so you might get a better answer in a VB forum. Some VB activeX controls work within Access but not all. Access uses subforms in datasheet view to provide grids. Are you trying to do something that the subform approach does not handle?
 
I will look into a sub form as that may work. My goal is to show a table of data that can be sorted or searched.
 
The subform is very close to what I'm looking for. I need the ability to click on a customer in list and bring up another sub form.

Example

I have a table with all my customers names and addresses in it. When I load the startup form it shows the customer list in a table(via subform), I want to be able to click on a record and pull up another form with all the companies detailed information.
 
Flexgrids or grids come in various flavours. My experience is with the ComponentOne flexgrid because I didn't find the MSflexgrid flexible enough. I'm using the lite version which doesn't support binding. So instead I use recordsets to transfer data to and from the grid. Even with binding I think you normally bind in code i.e. the datasource is set in code (not certain). See here for links on the MSflexgrid:
MS Flexgrid resource
Setting the datasource

Also try this

The flexgrid is a grid (obviously) and more like a spreadsheet. You can even get it to perform like a spreadsheet with formulas etc. But databases such as Access don't lend themselves to this kind of structure. If you have your data stored in a "spreadsheet" structure" it is more likely to be non-normalised (bad idea). So to retain normalisation in your database and use a flexgrid you normally have to coerce the data to and fro. An example is my forecasting database. I store my history and forecasts in normalised tables i.e. each record is a month/year with just one forecast value (tall thin tables). But my flexgrid shows my months horizontally across the page (short fat tables much more helpful for forecasting). And also I can show history on the same grid and the two remain in sync if I scroll (whereas they wouldn't if I used two subforms for example).

As you can see, a grid takes quite a bit of coding and is not the natural way to use a database. If you are new to databases I would suggest getting your head round normalisation and I would support Pat's point about looking at the standard tools within Access. If you can describe your requirements I'm sure the folks here can advise a good design.

Chris
 
Sorry, didn't read your example. JBB's link may be the way to go. I've also given a very simple example here

Chris
 
Yes, I'm sure I saw something about that awhile ago. I'll post a link When I find it.
 

Users who are viewing this thread

Back
Top Bottom