10 Common Data Structures - Got a "use example"? (1 Viewer)

Uncle Gizmo

Nifty Access Guy
Staff member
Local time
Today, 13:54
Joined
Jul 9, 2003
Messages
16,282
Tony,

Here is a link to some data structures with vba. The author's site is Excel oriented, not Access. But structures can/could be adapted.

Here is link to a recent video/webinar by Paul Kelly on Dictionary (also an Excel oriented site).

Hi Jack, thank you for pointing me to that video very interesting.

I note that the "use" was to extract the data from an Excel spreadsheet and put it in a dictionary.

I couldn't help thinking that I wouldn't need a dictionary because I could access an MS Access table directly with SQL, and/or record set loops. That got me to thinking, I'm pretty sure it's possible to interrogate Excel, "Cell data" as an actual record set.

I mention this because I think that might be a better route for an MS Access VBA programmer who found themselves working in Excel.

I don't actually know as I haven't tried either record sets or dictionaries in Excel however I thought it worth mentioning...

Might well be my next experiment!
 

jdraw

Super Moderator
Staff member
Local time
Today, 08:54
Joined
Jan 23, 2006
Messages
15,379
Tony,
I am not an excel person -I dabble with it - but only very surface stuff.
My point was that such data structures exist and can be accessed/used with Access.

The authors of both sites I mentioned are showing some code/webinars etc, but behind the scenes they are offering excel-oriented books/ebooks for sale. I'm sure they are well done and useful -if you were working in Excel.

It's the concepts of the vba and these structures that I found interesting and could be used with Access or any other Office product supporting vba..
 

Uncle Gizmo

Nifty Access Guy
Staff member
Local time
Today, 13:54
Joined
Jul 9, 2003
Messages
16,282
My point was that such data structures exist and can be accessed/used with Access.

Yes I'm with you on that. And thank you again for the link. I found the link I posted about the different data structures and I was struck by the fact that I never seem to have a need to use them.

In other words I was wondering if there is a particular case in MS Access where you would use them.

It's like I am lacking something from my repertoire, but then I don't have anywhere to apply it. That's what got me thinking, I'm probably doing everything I need to do already but in a different way...

The thing is, if I'm going to get proficient in another language, I'm going to need to be comfortable with these different ways of doing things.

It's the same old story, you're much better off learning techniques in the language you are familiar with.

So that should be my next step, next time I think of using a recordset loop, I'm going to try it with a Dictionary and a Class Module... (maybe!)
 
Last edited:

jdraw

Super Moderator
Staff member
Local time
Today, 08:54
Joined
Jan 23, 2006
Messages
15,379
Hi Tony,

I studied data structures as a course back in university. We used PL/1 back then and had assignments with queues, stacks, FIFO/LIFO and have used Arrays since introduced in Fortran in the 60's.

If you look at any of the posts that deal with JSON and VBA, you will find use of Dictionary and Collections.
It would make a great class module.

Good luck.
 

Users who are viewing this thread

Top Bottom