Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Other Forums
 MS Access
 Writing VB in Access

Author  Topic 

ConfusedOfLife
Starting Member

35 Posts

Posted - 2002-09-05 : 20:31:45
Hi, I wanted to know how to write VB code in access? Do you know any good online tutorial for doing so? I also heard that if Access ins't installed on someone computer, then he/she can not view access programs, I mean those that have VB code and you shouldn't actually open them in the access itself to view them, is that right?


JustinBigelow
SQL Gigolo

1157 Posts

Posted - 2002-09-05 : 23:03:39
Hit Alt + F11 from within Access to get to the VBA (Visual Basic for Applications) Environment, from there the Help menu pertains to VBA as opposed to Access so that should be a good start.

Also the following link should help [url]http://msdn.microsoft.com/vba/[/url]

Concerning your second question. If you arent sure whether the user will have Access on their machine or not I would suggest look at MS Office Developer Edition, this will give you the Access Runtime which is a redistributable Access environment for anything requiring the Jet Database Engine (the important part of Access).

hth,
Justin

Have you hugged your SQL Server today?
Go to Top of Page

ConfusedOfLife
Starting Member

35 Posts

Posted - 2002-09-08 : 18:58:04
Sorry, I know that it's a real dummy question! but, I think that MS Office Developer Edition is a book, isn't it? where can I find it? also you said that it'll give me the access runtime, and that database engine, is it a file or something that if I put it with my program and give it to someone else, he/she can use it without Access installed on his/her comp?

Go to Top of Page

timmy
Master Smack Fu Yak Hacker

1242 Posts

Posted - 2002-09-08 : 22:43:28
The Access developer tools is shipped with MS Office Developer Edition (as opposed to Professional, Small Business etc). The Access runtime and MSDE can be bundled with your applications free of charge.

Go to Top of Page

ksw
Starting Member

24 Posts

Posted - 2002-09-09 : 18:38:28
The Alt + F11 thing only works in Access 2000. If you have Access 97, open Help, go to the Contents Tab and look for "Microsoft Access and Visual Basic for Applications Reference". This will at least give you a place to start. In both 2000 and 97, to get a code window, go to the Modules tab and click New.

If Access does have VBA code, then anyone that has permissions to open the database, can see your modules, unless you hide the Database window when the database opens. This is usually done using a macro named AutoExec. This will always run when a database is opened. You would then code into the macro an Open Form command (tell it to open whatever form your application is supposed to start with) and then a Hide Window on the database window. Sorry I can't remember the exact syntax off the top of my head.

Also, VBA, which is available in Access and most other Office products, is just a subset of VB.

--KSW

Go to Top of Page
   

- Advertisement -