Cannot put a Grid Control on one of the forms

  • Thread starter Thread starter Gordon Buhagiar
  • Start date Start date
G

Gordon Buhagiar

My scenario is that I have designed some forms in Access
so that I could display and manipulate some data that is
resident on SQL server. However when I come to insert a
Grid control on the form an error message pops up. The
error message is "You don't have the liscense required to
use this ActiveX control. You tried to open a form
containing an OLE object or ActiveX control or you tried
to create an ActiveX control. To obtain the appropriate
liscence, contact the company that provides the liscenced
OLE object or ActiveX control." In the tool that I am
coding I am only using basic Access built-in commands.

Can you please advise?

Thanks and Regards
Gordon Buhagiar
 
I am NOT aware of any built in grid controls for ms-access.

Hence, it sounds like you ARE in fact choosing a grid control, but ms-access
has no such control built in.

However, you can easily similar grids in ms-access by using a continue form.
Here is some screen shots, and some ideas of what I mean:

http://www.attcanada.net/~kallal.msn/Articles/Grid.htm

So, either createa contnues form, or if you need a grid on an existing
screen, then use a continues form, but as a sub-form.
 
Hi Albert,

Thanks for the site and the info.

However I had already tried to use the continuas forms in
my tool. The problem that I was facing is that I am
getting the data from the sql server in a ADODB recordset
(fields are unbound).

When I tried to create a continuas form it only seemed to
work when I first imported the tables into Access and then
created a form where the fields were bound. However I
don't wish to set the tables this way.

Can you please advise?

Thanks and Regards
Gordon Buhagiar
 
Well, if you are using a un-bound form, then you can't use continues forms.

However, I don't see why you don't use a bound form anyway?

You might try binding the form to that reocrdset. I have not tried that
approach, but should work. (it will be read only as a result). access forms
will take on either a dao, or a ado reocrdset when you assign a reocrdset.

However, I doubt you will see any difference in performance if you just use
a bound continues form. In fact, if the data has any joins in the data, then
just create a view (server side), and use that for the continues form. You
can then load up/open the continues form using a "where" clause if you need
to restrict the records shown. In fact, you can even stuff in the sql source
for the form like

me.RecordSouce = "select * from v_CustomersView where City = 'Edmonton'"

The above does perform well with sql server.

If you REALLY want to use a grid control, then you will have to jump over
the VB groups and examples. In other words, you need to start looking at
some VB code examples.

Few of us bother to take the extra time and coding to use grid controls when
we have such great time saving things like continues forms (other wise, we
would just asked for 3 times the budget, and simply coded the application in
VB. Ms-access generally outputs 3 times the amount of application
development for the given amount of effort (or budget!) as compared to VB.
However, this extra speed is ONLY realized when you use the features of
ms-access, and do things the "access way".

It is tough not knowing exactly the what's, when's and how you need this
grid in your application, but my instincts tell me that you don't need a
reocrdset, nor a whole whack of code to load up a grid control either. (you
will need to use code to load up the grid control from a reocrdset).

So, if you do need (or want) to use a grid control, they are NOT native to
ms-access, but many will work. Since so few of us use the grid controls in
ms-access, then you will have to hunt in the VB groups for some code
examples. Further, the better grid controls do assume that you are also
placing connection objects on your screen, which again we don't use/need in
ms-access.
 
Back
Top