First timer in VB code

A

anthony p.

Hi,

Good day!

My problem is on how to put a Visual Basic code to my
controls on my form. I don't have knowledge in VB but i
bought a book and i am really interested to learn for it
but the problem is for now i don't have CD Installer
yet. This is why i want to try/use these codes to my
database files created in Access.

Anybody can give me a very simple computation sample to be
coded in event code builder and on how do i run it.

Many thanks.

Anthony
 
D

David Cleave

In Access, code is generally stored in a module which corresponds to a form.
Thus, code for a particular control will actually appear in the same place as
code for all the other controls on the same form.

To add code to a control, open the form in design view, select the control,
open its properties and select the Event tab. Choose the most appropriate
event for your code. For example, 'On Click' runs code when the control
(usually a button) is clicked on, and 'After Update' runs code when the
control's data is updated.

Click on the three dots at the right hand edge of the box for the event, and
choose 'Code Builder'. You will be taken to the module for that form, and the
name of the Sub and the End Sub bits will have been added in for you. Type in
your code between them.

Hope that's what you wanted to know.

David
 
A

anthony p.

Hi again,

Thanks a lot! I got it but may i request for a very simple sample
computation code and how do i run it in my form.

Again, thanks a lot.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top