Creating form from code

V

Vladimír Cvajniga

Images

--------------------
Report templates:
http://img148.imagevenue.com/img.php?image=09743__AutoReport_Template1_418lo.jpg
http://img104.imagevenue.com/img.php?image=09787__AutoReport_Template2_454lo.jpg
http://img20.imagevenue.com/img.php?image=09776__AutoReport_Template3_418lo.jpg
http://img144.imagevenue.com/img.php?image=09754__AutoReport_WTemplate1_407lo.jpg
http://img21.imagevenue.com/img.php?image=09759__AutoReport_WTemplate2_327lo.jpg
http://img158.imagevenue.com/img.php?image=09789__AutoReport_WTemplate3_401lo.jpg

User interface form:
http://img137.imagevenue.com/img.php?image=09765__AutoReport_frm1_582lo.jpg
http://img14.imagevenue.com/img.php?image=09771__AutoReport_frm2_315lo.jpg

The report:
http://img161.imagevenue.com/img.php?image=09748__AutoReport_The_Report_401lo.jpg

--------------------

Incremental search:
http://img165.imagevenue.com/img.php?image=09782__IncrementalSearch_481lo.jpg

--------------------

I hope that now it'll be very easy to understand the ideas... and that MS
guys will do their best ASAP! ;-)

Vlado

Vladimír Cvajniga said:
As to me, I don't understand why MS has added those Create... functions to
Access. The only situation when I need to create a new form/report is when
I run out of resources (1000 objects). I NEVER use
CreateForm/CreateReport. When I'm in open MDB-project I often use design
mode to create reports/forms.

I have added "automatic reports" feature to my projects. They are based on
form's recordset. User has ability to select fields, sort, totals... plus
some more options (page breaks on group level, save/read automatic report
settings, etc.). To make it work I had to add a few template reports to
each of the project. Template reports contain "raw" controls and I "play
games" with this stuff.

The idea of automatic reports comes from Czech relational DB system PC
FAND. I just wonder why we don't have automatic reports in MS Access. :-/

BTW, I desperatly miss incremental search in MS Access, too. I had to
create one form plus some supporting code to have thic functionality in my
projects.

Vlado
 
V

Vladimír Cvajniga

In fact, as to front-end file size, there no storage problem... except 1000
objects limit!
But 2GB for data storage is too low... :-(

Also, I'd like to store common functions in main project where I'd create an
interface for calling sub-projects.

My A97 largest project so far is nearly 50MB (FE), but it contains ~800
class-module objects (forms, reports & code modules).

I re-use objects (as I did years ago in PC FAND), ei. I don't use different
form/report for different recordsets... I couln't live without that. ;-)
And without that I should have exceeded Access limits long time ago.

There are many "dynamics" in my projects. A few weeks ago I've started a new
structured project and it surely will exceed current Access limits.

Vlado
 
S

storrboy

How do I use "library databases"? Never heard of this function.

That would be one of the games some of us play.
The idea is to use a database like a DLL, OCX or addin.

Take a bunch of the DB objects you use often and put them all together
in a database of thier own. Reference this new one in other projects
and use it's public objects and functions. It takes a bit of planning
but it can cut the size of a project and make your most used stuff
more portable. I believe one drawback is that both dbs must be in the
same format - mdb or mde. I don't think you can mix them.
 
V

Vladimír Cvajniga

I'm affraid you're wrong. MDBs can't be handled as DLLs or OCXs. I have no
experience with add-ins... but I think add-in would not meet my needs.

Vlado

"storrboy" <[email protected]> píse v diskusním príspevku
How do I use "library databases"? Never heard of this function.

That would be one of the games some of us play.
The idea is to use a database like a DLL, OCX or addin.

Take a bunch of the DB objects you use often and put them all together
in a database of thier own. Reference this new one in other projects
and use it's public objects and functions. It takes a bit of planning
but it can cut the size of a project and make your most used stuff
more portable. I believe one drawback is that both dbs must be in the
same format - mdb or mde. I don't think you can mix them.
 
V

Vladimír Cvajniga

I have tried to reference to an MDB and I will test some tricks ASAP.
TYVM for the idea! It's new to me - haven't read about it in any Access
book. There are many restrictions when referencing to an MDB (MDE?) but it
should help a little. It will really need some planning...

Vlado
 
S

storrboy

I'm affraid you're wrong. MDBs can't be handled as DLLs or OCXs. I have no
experience with add-ins... but I think add-in would not meet my needs.

Vlado

"storrboy" <[email protected]> píse v diskusním príspevku

That would be one of the games some of us play.
The idea is to use a database like a DLL, OCX or addin.

Take a bunch of the DB objects you use often and put them all together
in a database of thier own. Reference this new one in other projects
and use it's public objects and functions. It takes a bit of planning
but it can cut the size of a project and make your most used stuff
more portable. I believe one drawback is that both dbs must be in the
same format - mdb or mde. I don't think you can mix them.


Put some public functions in a DB, create a refernce in another and
call those functions. The comparison was in setting the reference and
using it's contents, not in specific usages.
 
D

David W. Fenton

The idea of automatic reports comes from Czech relational DB
system PC FAND. I just wonder why we don't have automatic reports
in MS Access. :-/

The form wizard can create "automatic" reports. You can print a
table view, with lots of room for formatting if you want.
BTW, I desperatly miss incremental search in MS Access, too. I had
to create one form plus some supporting code to have thic
functionality in my projects.

What is "incremental" search?
 
D

David W. Fenton


It's extremely easy to implement that in code. It's easy enough to
do with the built-in tools -- the FIND dialog has different sets for
whole field match, start of field, or anywhere in field; plus you
can type "H*" and find all recordsbeginning with H. And filtering
works the same way, with the ability to use the * wildcard (or ? or
@) in the built-in filtering mechanism without any need to code for
it.

That said, I wouldn't want to have to train my users on how to use
that generalized tool. Instead I'd do what you've done and program a
specific interface for them to accomplish what they need to do.
That's not an issue of built-in features being included or lacking
-- it's just a matter of choosing whether you want to train your
users on the built-in features or build something customized
specifically for their needs.
 
D

David W. Fenton

In fact, as to front-end file size, there no storage problem...
except 1000 objects limit!

I've never gotten anywhere close to that in any of my projects.
But 2GB for data storage is too low... :-(

Then don't use Jet to store your data -- use SQL Server or some
other server database.
Also, I'd like to store common functions in main project where I'd
create an interface for calling sub-projects.

Not sure what you mean, but you can do this quite with a library
database.
My A97 largest project so far is nearly 50MB (FE), but it contains
~800 class-module objects (forms, reports & code modules).

Do you actually have code in all the forms/reports that have
modules? You might want to uncheck the HasModule property of
forms/reports that have no code. Dunno if this will reduce your
object count or not, but it's there.
I re-use objects (as I did years ago in PC FAND), ei. I don't use
different form/report for different recordsets... I couln't live
without that. ;-) And without that I should have exceeded Access
limits long time ago.

There are many "dynamics" in my projects. A few weeks ago I've
started a new structured project and it surely will exceed current
Access limits.

I think you *must* be doing something wrong as I can't conceive of a
project that needs that many objects.
 
D

David W. Fenton

I'm affraid you're wrong. MDBs can't be handled as DLLs or OCXs. I
have no experience with add-ins... but I think add-in would not
meet my needs.

No, you're wrong. Like a DLL, you can use a library MDB/MDE as a
library of functions that can be called from another project by
setting a reference to it.

In regard to OCX's (or ActiveX controls), the comparison is not
quite so close, but you can have forms and reports in a library
database and use them from a database that has a reference to the
library database (or just calls the library databse directly). The
Access wizards are delivered in this format and the forms you see
onscreen when running wizards are not stored in your own MDB.

The Access Developers Handbook has extensive coverage of how to do
this kind of thing.
 
V

Vladimír Cvajniga

We are talking about forms and reports: CreateForm, CreateReport,
CreateControl, CreateReportControl. I could easily live without those
because I don't need them at all. I wonder if anybody uses these functions.

CreateDatabase, CreateTable, etc., is totally different kind of stuff. I use
them quite often.

Vlado
 
V

Vladimír Cvajniga

There's some info about Incremental find @ Wikipedia:
http://en.wikipedia.org/wiki/Incremental_find.

Database incremental search:
http://www.usabilityfirst.com/glossary/term_918.txl
http://www.codeproject.com/vb/net/Incremental_search.asp

You could fine more about incremental search in Google:
http://www.google.co.uk/search?hl=en&q=what+is+"incremental+search"&meta=


Also see
http://img165.imagevenue.com/img.php?image=09782__IncrementalSearch_481lo.jpg.

I have to try Pinnacle Studio or Windows Screen Recorder so that I can
create some videos...

Vlado
 
V

Vladimír Cvajniga

There are plenty of forms/reports which have HasModule set to FALSE.

Example to call a sub-project in PC FAND:
Call(SubProject)
or
Call(SubProject,SpecificProcedureOrFunction)
The second one is simply SUPERB!!! In Access: I think it can be done via
reference to an appropriate MDE, but I think you must specify all data
connections to each sub-projects' databases from main project :-(.


In MS Access terms:
- I have a main project (Main.mde) for commonc functions & a dashboard
- I have several sub-projects (Sub1.mde, Sub2.mde, Sub3.mde) for specific
tasks
- I'd like to use Call "Sub1.mde" (imagine some kind of dashboard) from
within Main.mde; any sub-project can recognize & use all functions declared
in Main.mde... as well as tables (data connections), forms, reports, etc.
....
I've never gotten anywhere close to that in any of my projects.
Have you ever programmed accountings & taxes & earnings & properties (&
more)? Can you imagine all of these in one project?

Vlado
 
V

Vladimír Cvajniga

TYVM for your respond. I'll try to get The Access Developers Handbook. And
I'll try some referencing to see how it works. I'm affraid it will not cover
all my needs but I'd better try.
IMHO, all the developers' stuff (basic & advanced) should be a part of MS
Access Help system! :-/

Vlado
 
V

Vladimír Cvajniga

Will surely try referencing! TYVM for driving me right way.

Vlado

"storrboy" <[email protected]> píse v diskusním príspevku
I'm affraid you're wrong. MDBs can't be handled as DLLs or OCXs. I have no
experience with add-ins... but I think add-in would not meet my needs.

Vlado

"storrboy" <[email protected]> píse v diskusním
príspevku

That would be one of the games some of us play.
The idea is to use a database like a DLL, OCX or addin.

Take a bunch of the DB objects you use often and put them all together
in a database of thier own. Reference this new one in other projects
and use it's public objects and functions. It takes a bit of planning
but it can cut the size of a project and make your most used stuff
more portable. I believe one drawback is that both dbs must be in the
same format - mdb or mde. I don't think you can mix them.


Put some public functions in a DB, create a refernce in another and
call those functions. The comparison was in setting the reference and
using it's contents, not in specific usages.
 
T

Tony Toews [MVP]

Vladimír Cvajniga said:
Unfortunatelly, it's true. Can this be changed in future versions of Access?
What do you think?

Highly unlikely. Not being able to open an object in design view is
why MDEs even exist.

Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
 
T

Tony Toews [MVP]

Vladimír Cvajniga said:
As to me, I don't understand why MS has added those Create... functions to
Access.

MS needed those tools themselves for creating forms and reports using
the wizards. So they just made those available to the public.

Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top