VB or VBA?

Uncle Gizmo

Nifty Access Guy
Staff member
Local time
Today, 04:02
Joined
Jul 9, 2003
Messages
17,332
I'm reasonably sure that the code depicted on this "Control object (Access)" Microsoft help page is VBA.

However the heading indicates that it is VB. I assume this is an error!
 
I have seen that in several M$ documentation examples. The page bread crumbs certainly support that it is for Access vba. I would ignore what looks like a mis-nomer.
 
I don't recall that VB implicitly defines "Me" because that has a very specific meaning that is part of the Access programming environment. Those shortcut names are part of Access itself so that has to be VBA.
 
As I mentioned, the crumbs -
Docs / Office VBA Reference / Access / Object model / Control object

and the page title in huge bold font
Control object (Access)

eliminates all doubt for me.

Obviously the technical writer is Canadian, and what he/she heard the software engineer say was "I'll email you the code later. It's for VB, eh?" :D
 
Well, when I want to use code blocks on my site I use *VB* because I could not find formatting for VBA. Yep, seems silly because VBA is the language of Office but it is what is is. As other have said, ignore the VB heading.
 
"Me" because that has a very specific meaning that is part of the Access programming environment.
As far as I know the Me keyword has no specific Access meaning. It has the same meaning throughout vba and VB. It refers to the current instance of an object. The Me keyword is definitely not an Access or even a vba unique keyword. For sure it is in VB. Most other languages have something similar (Me, This, Self, ...) to refer to the current instance of an object. However, that page is referring to Access unique structures.
 
I would ignore what looks like a mis-nomer.


Doing some more research for my latest MS Access Project, I notice VB instead of VBA everywhere? Now this would imply that the selection of VB / VBA is centralised, and somehow this mistake has propagated across the whole site.

It would be interesting to find some places where the change has not taken place. So it's either a mistake ( Most likely ), or more interestingly Microsoft might be reconsidering the differences between VB and VBA and considering unifying both under one heading?
 
VBA and VB.NET are identical in the way they refer to Office Objects. Anyone working in VB.NET is going to be able to work with the VBA code provided.

Indeed, if copied into a VB.NET project in Visual Studio, the code will probably adjust itself automatically. For example the Set keyword is automatically dropped when VBA code is pasted because VB.NET is object oriented and hence the difference between Let (the taken as understood default in VBA when assigning a value to a variable) and Set is not relevant.

(For those who didn't understand what I am saying, note that non-object variables can be assigned using the keyword Let in VBA.)
 
Thanks, MajP, for the clarification. I have so rarely had to deal with VB that I never ran across that. My "standalone" stuff in BASIC was for another system, so it limited my exposure to VB as-such.
 
Well of COURSE they are out of favor. They aren't new products. The "powers that be" want you to buy their newest, latest, greatest (?) stuff. Don't you realize that, Uncle G?
 
Perhaps the latest flavour of the month? Integration between SharePoint and Access was once the next greatest thing. DAO was on it's death bed, waiting to be outshone by ADO. What happened to those 'next greatest' transistions? To me, it's kind of like the boy who cried wolf too often. Regardless, it won't matter to me which way things go.
 
Now that I'm retired, I will probably stick with what I've got unless someone somehow talks me into a teaching position or consultancy. But at the moment, not in my crosshairs.
 
Well of COURSE they are out of favour. They aren't new products. The "powers that be" want you to buy their newest, latest, greatest (?) stuff. Don't you realise that, Uncle G?

>>>The "powers that be" want you to buy their newest, latest, greatest (?) stuff<<<

I sometimes wonder why things cost so much. And then I do what appears to be a simple bit of programming and it ends up taking me 4 hours to do something that anyone looking at would say well that must have only taken you 5 minutes to do that.

Really Microsoft has been remarkable in the way it has continued it's products in the same vein, making incremental improvements, keeping their customers on board, not pissing them off too much! But it look like they were running into a big problem, they needed to step up from the PC to the internet, I thought that they would struggle. I think they did in the beginning, and I was convinced that Google was going to come out on top.

Lately I have been using Microsoft online stuff, Dynamics 365, and although I find it a bit lacking, a bit amateurish, a bit of a cobbled together look and feel to it, a bit like some of the early Microsoft products, I am actually quite impressed with it.

Talking about Google, they don't have a clue how to look after their customers. Somebody pointed out to me recently that Googles business model is it's free, so tough. If you don't like it, they don't care. They don't listen to their customers, because they don't see that they have customers. Where as Microsoft probably don't listen to their customers that much, but at least they treat them as customers to a degree.

I'm going away from Google now, too much, lately, has just been shite, basically Google is a brilliant, lovely product, but then you just get the little tiny niggly thing wrong, and that just spoils it for me. I mean even if I could ask google, and you can't, but if I could ask, and they said "No" we're not going to be doing that for a few years, that would be something! But they are just not customer orientated.

What I got from your comment Richard was Microsoft want to sell us the latest and greatest, they want to make money so they can invested in making the next iteration. I didn't think Microsoft would get to the next iteration the web, not before Google, but they have and it's good. It also looks like Another iteration they want to impose is to shift their developers from VB over to C Sharp, I don't think this is a big problem for VB/VBA developers especially as I think I saw somewhere a converter for converting VB into C Sharp. And from what I see, it's mostly a change in syntax. Stick in a few curly brackets and you're a C Sharp Programmer!
 
The main difference between any flavor of BASIC and any flavor of C is that the bases of the two languages are different. BASIC is a (moderately) strongly typed language that does automatic type checking and conversion. Originally, C was actually a set of MACROS in the PDP-11 (MAC 11) assembly language. Type checking? You've GOT to be kidding, when talking about assembler macros.

Granted, modern versions of C have improved that weakness to some degree, but it will all still depend on how robust they make the programming environment. If they scrimp on data typing, they will have a dung-heap on their hands - a pile of steaming dyspeptic dragon droppings just waiting to stink up the place.

Access was designed for the proprietor of a small business to help make his/her business have decent customized tools. Because the original design was SO (relatively) robust, even a poor programmer could make SOME headway before having to stop to actually learn something. BASIC is so simple for some things that simple examples work well as a teaching tool.

C# on the other hand has some of C's more complex syntax. And one will have to wonder what one might do when faced with A := (B)+, since C# would normally allow one to have mutable pointer variables pointing into arrays so that you could auto-increment your way through an array based on the pointer as an index. But the Access environment isn't about memory arrays. And that's just one issue to consider.
 

Users who are viewing this thread

Back
Top Bottom