First timer in VB code

  • Thread starter Thread starter anthony p.
  • Start date Start date
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
 
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
 
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.
 
Back
Top