473,695 Members | 2,138 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Basic VB/Access2003 syntax, how to find out about it?

How and where can one find out about the basics of VB/Access2003
syntax?

I am a died in the wool C/C++/Java Linux/Unix programmer and I am
finding it difficult to understand the program format for accessing
objects, controls, etc. in VB/Access2003.

In particular where will I find explanations of:-

Actions, Functions, Methods, Properties - I'm understand the
concepts but I can't find anywhere that explains where each is
used, in my world a 'method' is simply a more modern name for a
'function'. Why are they all different?

The syntax for getting values of Properties and Objects, where []
are needed and where to use '.' and where to use '!'.

Where one can use 'me' and what it means.

Etc.!

None of this seems to be particularly easy to find in the Access help.
--
Chris Green

Apr 2 '06 #1
13 3025
us****@isbd.co. uk> wrote in message news:44301b92.0 @entanet...
How and where can one find out about the basics of VB/Access2003
syntax?


The access 2003 help is split into two parts..

#1 part - User part

This is the basic product called ms-access. How to add a record, how to
move...how to print a report. Since MANY people use ms-access WITHOUT
writing any code. This is the basic product.

So, if you launch ms-access, and then go help->Microsoft access help. This
is the general help. (part#1).

#2 part - programmers part.

However, if you flip into the code IDE, then you will receive VB help.

So, while in your application, hit ctrl-g (or alt-f11)

Now go help->Microsoft visual basic help.

Note the list nice list, and all of the methods, properties...ev ents,
function list is all VERY nicely grouped. There is also a JET sql reference,
and a few other goodies....

Do note that while ms-access use the SAME coding syntax as VB6, the learning
curve in ms-access is STEEPER then that of VB6. This is because the objects
models in ms-access are far more complex that those in VB6.

For example, while most would use a flexgrid, or a listview activeX control
in most languages, if you take a look at the following screen shots, you can
do this native in ms-access without having to resort to activeX control..

http://www.members.shaw.ca/AlbertKal...icles/Grid.htm
The best site for code examples, and virtually every coding task you might
every need can be found here....do take a browse
http://www.mvps.org/access/

Note the "forms", "reports" etc on the left side...they all have tons of VBA
code examples....
--
Albert D. Kallal (Access MVP)
Edmonton, Alberta Canada
pl************* ****@msn.com
http://www.members.shaw.ca/AlbertKallal


Apr 3 '06 #2
Open a module.
Click on the object browser (a yellow box with floating othingmes
above, or press f2).
All will be revealed unto you.
Well, not quite all; right click in one of the windows; choose "Show
Hidden Members"; now all will be revealed unto you.

The help file is mostly just crap; a high percentage of it is wrong and
the rest is inefficient and/or ludicrous. Trust it as much as you would
the significant woman in your life.

Apr 3 '06 #3
:~) 'dyed in the wool'

dye<>die

:~)

Actions, Functions, Methods, Properties
... Why are they all different?
None of those are fundamental BASIC concepts - they
have all been tacked on to serve market fashions. As
with any fashion trend, they look a bit strange when
viewed in retrospect.
The syntax for getting values of Properties and Objects, where []
are needed and where to use '.' and where to use '!'.
[] is used when you have a name with a space in it.

.. is for properties.
! is for members of collections!

'me' is the form object you are coding. you can use
it when you write code in a form object. It is implicit,
so it is never required. In Access, it is often used
for clarity, because there are often recordset field
objects that have the same names as controls on a form.

(david)

<us****@isbd.co .uk> wrote in message news:44301b92.0 @entanet... How and where can one find out about the basics of VB/Access2003
syntax?

I am a died in the wool C/C++/Java Linux/Unix programmer and I am
finding it difficult to understand the program format for accessing
objects, controls, etc. in VB/Access2003.

In particular where will I find explanations of:-

Actions, Functions, Methods, Properties - I'm understand the
concepts but I can't find anywhere that explains where each is
used, in my world a 'method' is simply a more modern name for a
'function'. Why are they all different?

The syntax for getting values of Properties and Objects, where []
are needed and where to use '.' and where to use '!'.

Where one can use 'me' and what it means.

Etc.!

None of this seems to be particularly easy to find in the Access help.
--
Chris Green

Apr 3 '06 #4
Albert D. Kallal <ka****@msn.com > wrote:
us****@isbd.co. uk> wrote in message news:44301b92.0 @entanet...
How and where can one find out about the basics of VB/Access2003
syntax?
The access 2003 help is split into two parts..

#1 part - User part

This is the basic product called ms-access. How to add a record, how to
move...how to print a report. Since MANY people use ms-access WITHOUT
writing any code. This is the basic product.

So, if you launch ms-access, and then go help->Microsoft access help. This
is the general help. (part#1).

#2 part - programmers part.

However, if you flip into the code IDE, then you will receive VB help.

Yes, OK, I've got there.
So, while in your application, hit ctrl-g (or alt-f11)
Though not by doing this, a helpful short cut, thanks.

Now go help->Microsoft visual basic help.

Note the list nice list, and all of the methods, properties...ev ents,
function list is all VERY nicely grouped. There is also a JET sql reference,
and a few other goodies....
Yes, absolutely fine if I know the name of the method/function/action
I want - BUT I haven't yet found anything that gives me any help on
the detailed syntax or an overview of why there seem to be so many
different sorts of 'do something' operations.

Do note that while ms-access use the SAME coding syntax as VB6, the learning
curve in ms-access is STEEPER then that of VB6. This is because the objects
models in ms-access are far more complex that those in VB6.
I don't have a big problem with the object hierarchy, it's the sort of
thing I'm already fairly familiar with. As I said it's the detailed
sysntax and what sort of 'things' to use where that confuses me.

For example, while most would use a flexgrid, or a listview activeX control
in most languages, if you take a look at the following screen shots, you can
do this native in ms-access without having to resort to activeX control..
This is where you (and I suspect the help system) loses me.
'flexgrid' and 'activeX' mean absolutely nothing to me.

http://www.members.shaw.ca/AlbertKal...icles/Grid.htm
The best site for code examples, and virtually every coding task you might
every need can be found here....do take a browse
http://www.mvps.org/access/
That looks a useful site. It does however worry me somewhat how much
of the information is the sort of stuff I would expect to be able to
find written down concisely in a language definition somewhere.

Note the "forms", "reports" etc on the left side...they all have tons of VBA
code examples....

Yes, I took a brief look down there, some of the examples should be
very useful, thanks.

--
Chris Green

Apr 3 '06 #5
Lyle Fairfield <ly***********@ aim.com> wrote:
Open a module.
Click on the object browser (a yellow box with floating othingmes
above, or press f2).
All will be revealed unto you.
Well, not quite all; right click in one of the windows; choose "Show
Hidden Members"; now all will be revealed unto you.
Except the syntax I'm after, and also the necessity of knowing where
to look for something before you start. But, yes, that is useful,
thanks!

The help file is mostly just crap; a high percentage of it is wrong and
the rest is inefficient and/or ludicrous. Trust it as much as you would
the significant woman in your life.

The "significan t woman" in my life is somewhat more reliable than
yours apparently! :-)

--
Chris Green

Apr 3 '06 #6
> Yes, absolutely fine if I know the name of the method/function/action
I want - BUT I haven't yet found anything that gives me any help on
the detailed syntax or an overview of why there seem to be so many
different sorts of 'do something' operations.
Well, I can't think of ANY help system that will explain the use of
pointers, or overloading in c++ either. Either you will have to get a book,
or learn some things over time. So, when learning a new system, connecting
the dots is hard. The docmd for example simply executes a method of the
ms-access appcation. So, in help...if you view any of the methods, you would
be browsing the list of docmd possible options.
I don't have a big problem with the object hierarchy, it's the sort of
thing I'm already fairly familiar with. As I said it's the detailed
sysntax and what sort of 'things' to use where that confuses me.
Learning to use what things where is certainly the issue. While some help
system actually might explain c++ pointers, I would be REALLY surprised if
the help system told you WHEN to use pointers. (that would be a amazing help
system!!). Again, I can't think of any c++, or any other reference that
tells you when you use what function or method *when*. That is essentially
conveying the essence of a development language, and I suppose if a help
system could do that, we would eliminate the learning curve of a language!
This is where you (and I suspect the help system) loses me.
'flexgrid' and 'activeX' mean absolutely nothing to me.


ok. The above is simply a refence to the standard windows technologies. The
term activeX apples to all development platforms in windows. activeX is
simply a means by which 3rd party controls (such as a calendar control) can
be placed on a form, and used. In other words, using a activeX control on a
ms-access form means you would NOT be using the native controls that are
available on the tool bar when in design mode. Access is a bit different
then many windows IDE's since it has NATIVE controls. So, if you develop an
application in VB6, or c++ in windows, you might use a combo box. The
standard combo box control included with VB6, or c++ or <your favorite
windows programming system> will ALL likely use the same combo box activeX
control. A acttieX is control based on inter-program communication.

In ms-access, you *can* use activeX controls, but you are STRONGLY advised
to NOT use activeX controls. This is due to the fact that MOST ms-access
applications are NOT deployed using a widows installer that can INCLUDE
these additional code libraries and dependencies. Since we don't have a
linker, nor a system that will automatically include these additional code
libraries (in this case activeX controls), then we try to avoid them. I do
on occasion include additional .dll libraries in my applications, but then I
have to build my own install scripts.

As a note, in windows, we call inter program communication "COM", or object
automation. In the linix world, this is referred to as COBRA. I don't know
the equivalent term for activeX controls in Linux/c++, but there is likely
an equivalent. (whatever lets you place a 3rd party control on a form and
communicate with it is what the technology is going to be called).

So, I am not sure where to start, but you are learning a new development
language,and further learning new platform at the same time. Further, while
it is easy to write code in ms-access, the real hard part is getting the
relational data designs correct. So, new platforms, new programming
language, and even harder is to learn database concepts. You certainly have
your work cut out for you.....

I would suggest that you consider some books....

http://www.mvps.org/access/resources/books.htm
--
Albert D. Kallal (Access MVP)
Edmonton, Alberta Canada
pl************* ****@msn.com
http://www.members.shaw.ca/AlbertKallal
Apr 3 '06 #7
> The "significan t woman" in my life is somewhat more reliable than
yours apparently! :-)


Yeah, yeah, sure, sure, whatever ...

Apr 3 '06 #8
Albert D. Kallal <ka****@msn.com > wrote:
Yes, absolutely fine if I know the name of the method/function/action
I want - BUT I haven't yet found anything that gives me any help on
the detailed syntax or an overview of why there seem to be so many
different sorts of 'do something' operations.
Well, I can't think of ANY help system that will explain the use of
pointers, or overloading in c++ either. Either you will have to get a book,
or learn some things over time. So, when learning a new system, connecting
the dots is hard. The docmd for example simply executes a method of the
ms-access appcation. So, in help...if you view any of the methods, you would
be browsing the list of docmd possible options.

.... but there are C and C++ and Java reference manuals which set out
the syntax concisely (as in books), I don't seem to be able to find
any equivalent books for VB/Access.

I'm still not clear on the differences between actions, functions,
methods, etc.

I don't have a big problem with the object hierarchy, it's the sort of
thing I'm already fairly familiar with. As I said it's the detailed
sysntax and what sort of 'things' to use where that confuses me.


Learning to use what things where is certainly the issue. While some help
system actually might explain c++ pointers, I would be REALLY surprised if
the help system told you WHEN to use pointers. (that would be a amazing help
system!!). Again, I can't think of any c++, or any other reference that
tells you when you use what function or method *when*. That is essentially
conveying the essence of a development language, and I suppose if a help
system could do that, we would eliminate the learning curve of a language!

I agree, it's a programming "fact of life" that no help systems and
few books tell you *why* to use particular constructs. However it's
usually not too difficult to find out what the syntax is, I can very
quickly find out how to write down a pointer to a structure element in
C or C++. On the other hand I still find it difficult to work out the
syntax for referring to an object element in VB/Access. Is there
anywhere that actually writes this out concisely or does everyone just
acquire how to do it from examples?

This is where you (and I suspect the help system) loses me.
'flexgrid' and 'activeX' mean absolutely nothing to me.


ok. The above is simply a refence to the standard windows technologies. The
term activeX apples to all development platforms in windows. activeX is
simply a means by which 3rd party controls (such as a calendar control) can
be placed on a form, and used. In other words, using a activeX control on a
ms-access form means you would NOT be using the native controls that are
available on the tool bar when in design mode. Access is a bit different
then many windows IDE's since it has NATIVE controls. So, if you develop an
application in VB6, or c++ in windows, you might use a combo box. The
standard combo box control included with VB6, or c++ or <your favorite
windows programming system> will ALL likely use the same combo box activeX
control. A acttieX is control based on inter-program communication.

In ms-access, you *can* use activeX controls, but you are STRONGLY advised
to NOT use activeX controls. This is due to the fact that MOST ms-access
applications are NOT deployed using a widows installer that can INCLUDE
these additional code libraries and dependencies. Since we don't have a
linker, nor a system that will automatically include these additional code
libraries (in this case activeX controls), then we try to avoid them. I do
on occasion include additional .dll libraries in my applications, but then I
have to build my own install scripts.

OK, thanks for the explanation.

As a note, in windows, we call inter program communication "COM", or object
automation. In the linix world, this is referred to as COBRA. I don't know
the equivalent term for activeX controls in Linux/c++, but there is likely
an equivalent. (whatever lets you place a 3rd party control on a form and
communicate with it is what the technology is going to be called).
COBRA is just one of many, many ways to communicate, we use it at work
between Sun Solaris and the MS world.

So, I am not sure where to start, but you are learning a new development
language,and further learning new platform at the same time. Further, while
it is easy to write code in ms-access, the real hard part is getting the
relational data designs correct. So, new platforms, new programming
language, and even harder is to learn database concepts. You certainly have
your work cut out for you.....
The database concepts bit I kow the basics as I've been developing
C/C++ programs that use Oracle (and call SQL queries) for many, many
years. I think this is part of my frustration, I can conceive what I
want in database terms but I find it difficult to put it into
practice.

I would suggest that you consider some books....

http://www.mvps.org/access/resources/books.htm

Yes, I quite agree! :-)
Thanks for all the help.

--
Chris Green

Apr 3 '06 #9
Good questions + answers on your part!!!
... but there are C and C++ and Java reference manuals which set out
the syntax concisely (as in books), I don't seem to be able to find
any equivalent books for VB/Access.

I'm still not clear on the differences between actions, functions,
methods, etc.
It is difficult, since a LARGE part of ms-access is using the *existing*
ms-access object model..and it is hand full!!

We have two parts:

#1
The programming language used is Visual Basic - for the most part, this
language is 100% the same as classic VB
(except that the forms used in ms-access are NOT the same as VB6 forms).

#2
The application model we interact with - ms-access (this is the complex
one).

So, all of your functions for the most part are simply VB expressions (the
above #1). There is a nice list of built in functions in that VB references
6th entry - Microsoft visual basic references.. (As a warning, stay away
from the "Microsoft Forms Visual basic Reference" found as a sub category
here--- we don't use these in ms-access)

So, functions for the most part are going to be found in the VB reference.

For what we call actions, and most methods...that is going to be the
ms-access object model, so, we use the first entry of
Microsoft Access Visual Basic Documentation (#2 in the above).

The VB references is quite general, and it has things like scope of
variables, looping, and virtually the whole VB language is documented.

Then, there is also the ms-access object model explained...you find the help
for that in the First entry of

Microsoft Access Visual basic reference

This is the one that you will use once you up to speed in Visual Basic...

So, methods + actions are really just using part of the ms-access
object....funct ions are the built in VB functions.
However it's
usually not too difficult to find out what the syntax is, I can very
quickly find out how to write down a pointer to a structure element in
C or C++. On the other hand I still find it difficult to work out the
syntax for referring to an object element in VB/Access. Is there
anywhere that actually writes this out concisely or does everyone just
acquire how to do it from examples?
There is some examples in both the VB reference, and the ms-access vb ref...

Lets look up the forms object..and how to use it......

in the VB ide, help->Microsoft Visual basic help

On the right...we click on the first ref....Microsof t Access Visual basic
references. (we are using a ms-access form...so, that why we look here!!)
Then expand the entry objects---> now choose "f" from the list....click on
forms object.

Now, you can navigate to the above via the collections object also (note
that EVERYTHING in ms-access is a collection).

So, also could have simply looked this up by the collections in ms-access
also. So, in place of the above forms, we could have went collections->
f---> forms collection. This winds you up with a genreal expalin of a form
(you could then click on the "see also" to jump to the forms object refercne
as we did above)..
COBRA is just one of many, many ways to communicate, we use it at work
between Sun Solaris and the MS world.


Yes, but in windows, we live and die by object automation. EVERYTHING you
use in windows is a com object (we don't care..and the programmers don't
care about this fact, or give it a 2nd thought.......b ut, it is important to
note that this is how it all works - and, for the record, .net is the EXACT
same idea..but it works OVER the internet!!)

So, for example to launch outlook with a attached report, we will use
Outlook as a object in our code. It is REALLY simple to do this. We just set
a reference in the code editor, and then without even giving it a thought ,
you can now write and use outlook code in your ms-access applications. (all
of the properties...me thods etc are instant available in the ms-access IDE
for all of outlook!).

Even windows scripts (batch files) will actually use object automation to do
things. (eg: nightly launch ms-access....gener ate a report.....send results
to a word document, launch outlook...attac hed the word document we just
made, and send it...- all of this can be done from a windows script, and
using application objects). Unix/linix people find windows batch files hard
to write, since you are actually working with objects in a windows
script....

Last, but not least, many will say that the help sucks compared to access 97
(that is 4 versions ago!!). However, I find the a2003 help quite good, and
in many ways it is BETTER then the access 97 help....

In addition to this great newsgroup, don't forget to check out the
Microsoft.publi c.access.* hierarchy of newsgroups. (point your newsreader
to news.microsoft. com).

--
Albert D. Kallal (Access MVP)
Edmonton, Alberta Canada
pl************* ****@msn.com
http://www.members.shaw.ca/AlbertKallal
Apr 3 '06 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
5183
by: Steven O. | last post by:
First, this may not be the correct newsgroup. I have some relatively basic questions on SQL. I tried to find a newsgroup that was specifically just about SQL, and was surprised to find that all the SQL-related newsgroups seem to be product related. But if I missed something, and someone can steer me to a correct newsgroup, please do so. My specific questions: 1. I want to put comments in an SQL script. For example, I want
9
2414
by: Lauren Quantrell | last post by:
Hoping someonce can tell me what compatibility problems I might run into when I have to have my Access Project developed on Access2K run in a user environment where users are using Access2003 as well as Access2000. I have already seen a problem where if I open my project using Access2003 and save any objects, then run it on Access2000, I encounter "Bad DLL Calling Convention error..." on the Access2K machines. If I never open and save the...
4
1286
by: Mark Linehan | last post by:
Greetings and salutations. I began programming God knows how many years ago in basic on the Commodore 64. I dabbled in a little assembly as well. I moved on to the PC eventually and stuck with basic under DOS and some C,C++ as well. Had a lot of fun. Concentrated mostly in the area of communications via modem, BBS's and that sort of thing. When windows came about, I lost interest in programming, being such a DOS-BOY. It seemed like I...
5
10359
by: planetthoughtful | last post by:
Hi All, I'm curious to know if anyone in the group can recommend any free Access2003 applications that are available for download and which feature great interface (ie GUI) design? I'm looking for inspiration for a major project I'm about to begin. I'm not too bad at GUI design, but I'm not necessarily all that innovative, and it would be helpful to see how other developers have approached GUI issues.
4
3331
by: Jan | last post by:
Have an SQL create/import script. Running this on SQL would make it create a table with some values. Can Access2003 somehow use such and SQL script? I went into SQL query view to try it out, but the amount of data was too big to paste in according to Access. Sample data: -- -- PostgreSQL database dump
6
1378
by: John Bailo | last post by:
http://www.informationweek.com/software/showArticle.jhtml?articleID=196600515 Developers Embrace Java, Drop Visual Basic "Developers have abandoned Microsoft's Visual Basic in droves during the last six months, and they're using Java more than any other development language, according to a recently published survey."
1
2604
by: RandomElle | last post by:
Can anyone help me out with locating & using the package and deployment wizard for Access 2003? I have searched for HOURS and cannot find the Package & Deployment wizard for Access2003 anywhere on my machine. It's supposed to be under Program Files/Microsoft Office/Package & Deployment.... It's not there and I don't have a folder with anything even close on my machine. I have installed: * MS Office Pro 2003 with Biz contact Mgr , *...
6
38506
Atli
by: Atli | last post by:
This is an easy to digest 12 step guide on basics of using MySQL. It's a great refresher for those who need it and it work's great for first time MySQL users. Anyone should be able to get through this without much trouble. Programming knowledge is not required. Index What is SQL? Why MySQL? Installing MySQL. Using the MySQL command line interface
3
1956
by: Ramchandar | last post by:
Hi, I am creating reports using VBA code. I have the same query in a querydef residing both in Access97 and Access2003. The result of this querydef is then moved to a table in Access97 and Access2003 respectively. The table in Access97 returns 874 rowcount, table in Access 2003 returns 1050 rowcount. In both the case the querydef is retrieving from the same database which resides in SQL Server 2003. I executed the application Access97 and...
0
8553
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9112
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8971
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8822
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7650
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6483
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4332
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4570
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
1970
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.