Question What are the use of VB REFERENCES

marianne

Registered User.
Local time
Yesterday, 22:32
Joined
Mar 26, 2009
Messages
327
in the microsoft visual basic references, how would you know that this type of reference is what you need in your coding?

Like: visual basic for applications, microsoft dao 3.6 object library.

how would you know or where would you know the purpose of that reference or its usage?
 
you know by experience really

these are really references to various dll's. which can be used to provide commonly required functions.

therefore if you require commonly required functions to eg, provide playing cards - then you need a dll that gives you these facilities. If you want to use excel from your access app, then you need ot set a reference to the excel library - Rather than include every possible dll as standard, access just lets you incorporate the dlls you need.

DAO and ADO were two alternative mechanisms access used to manage recordsets etc programmtically. with slightly different functionality. you need to ensure the correct reference is set - DAO is now the default (in A2007) and is set automatically, i think - however for a period with older access verisons, ADO was the default version, and the programmer had to set the correct version.

other than checking the correct choice between ADO and DAO, i don't think any other reference would NEED to be set in normal use.
 
thank you for your reply gemma. you mean I am going to learn it only by experience? don't it have any reference reading to I can read what dll or reference I should have?

I am not advanced in coding. I also see dll at the declarations of some modules like kernel32.dll, there is also this ".lib" file on the module. I want to learn that too.
 
Just to be clear that we're talking about two different things.

Declare statement allow us to reference to other library files (.dll, .tlb, .ocx, .lib and few more extensions) without binding. Most of time, Declare statement is used to access Windows API.

In the Tools -> References, checking a reference binds the application to that library file. What it means is that you now can use object browser and intellisense to expose the classes, methods, properties and such made available by that library. Handy for development, yes? Not really for distribution, because if you check a reference to Excel library and you have Excel 2007, then you copy your .mdb file to someone who has Excel 2003, you get a broken reference due to the different version.

To learn about various API calls, I usually use that website.

For library references, it's usually when you actually need it. Excel is already mentioned, but I'm thinking about cases such as having a bar scanner to scan in numbers for you where you would want to reference a bar scanner library (provided by the vendor) so you can grab the input from the bar scanner for example. Another case is when I wrote a custom library in C# to provide secure WAN connectivity to a remote backend.
 
whew. that is one programming problem for me. I learned access through self-taught. what can you suggest so that I may know that area of programming?
 

Users who are viewing this thread

Back
Top Bottom