Beginners Guide

ldare_2000

New member
Local time
Today, 11:51
Joined
Jul 31, 2007
Messages
2
Hello,

I am looking for some tips and advice. I am not very experienced with Access. I currently teach Visual Basic upto level 4 in a local college.

Our local council have paid for staff training and one of the area's they have requested is VB within Access. I need to deliver a three hour introduction course however do not really know what to show them. I don't know Access well enough to know where it's limits are and when VB needs to be used.

I have asked them on several occasions why they feel they need to use VB and what they currently can't do without it but they dance around the answer. To be honest I feel they have no idea what VB is and have seen it written somewhere.

I’ve looked in text books for VB tasks however the ones I’ve come across I know can be done in Access so are worthless.

Any advice on what I should cover would be great.

Kind Regards
Louis
 
VBA is important when you are trying to automate a dynamic appearance to your forms.

Issues to cover would be

1. VBA vs. VB - and how VBA is more tightly integrated with Access. VB handles Windows events and has to use some complex operations to build a child window, form, etc. whereas VBA merely uses things that Access allows you to build with other methods, THEN integrate some code options

2. First and generally simplest use of VBA for most users is as a response to EVENTS that lead to special rules or actions. Things like if check box A, disable box B or change color to C or something like that. So a general discussion of events would be helpful. Take an example of, say, using the Form_Load event to reset status of every field and then using individual After_Update events on some controls to enable and disable other controls.

3. You can use VBA in functions that are callable by queries, which might be useful. Topics would be opening the module window of a general module, use of the Public Functions xyz(abc as datatype) as datatype syntax. If there is some complex numeric formula that gets used a LOT, you gain some performance by putting the formula in a public function and then calling it via its public name, as opposed to writing out the full formula in every place where you would use it.

4. A discussion of how some functions "cross the line" between SQL and VBA. For instance, Domain Aggregates go either way. So rules that you would code into a query also can often be used in VBA code. Therefore, it would help to discuss some of the common VBA functions that happen to cross that line.

I'm thinking: All domain aggregates, many of the string manipulation functions, all of the Cxxx (convert to xxx) functions, all of the Datexxxx functions (DateAdd, DateDiff, DatePart, etc.) Discuss the syntax required for some of them.

5. I mention this here but it probably SHOULD be first: Tell them about Access Help and how to use it for VBA topics. Tell them about the many great Internet resources (not limited to this one) that they can use to find out more on a particular problem. Teach them how to search this forum and other forums to find answers to problems.

6. Tell them that it is incredibly important to understand what your trying to do BEFORE you attack a problem. No, not talking about "Know how to use VBA" - talking about "Know what it is that you want to do in ENGLISH."

7. There are some "Old Programmer's Rules" that they should know:

a. If you cannot do it on paper, you will never do it in Access. (Because you have to tell Access what you are doing. If you cannot do it on paper, you probably don't yet understand your own problem.)

b. Access never tells you anything you don't tell it first. (I.e. if you want reports on XYZ, you had better be TRACKING XYZ.)

c. Access is dumber than a box of rocks - but it still does exactly as it was told to do. So be sure you are telling it what you want it to do.

d. Remember that Access and Excel are two different tools with two very different purposes. And if Excel does it easily, the odds are that Access won't. (And vice versa.)
 
Thanks very much for that info its really useful :-)
 

Users who are viewing this thread

Back
Top Bottom