Getting started, accessing records etc

firefly2k8

Registered User.
Local time
Today, 14:24
Joined
Nov 18, 2010
Messages
48
Hi,

I have built some tables in Access, and i have set up a form. I have even set the record source of the form properties to my main table.

I want to use VBA to:

a) view/access the content of an existing record
b) edit the content of a record

Having spent half a day looking at info on the web, I conclude I am best to use sql to do this type of thing? and that i should probably buy a book.

Can someone help me quickly get started on a) and b), in the most appropriate way?

Where should my code sit - in the form class object, or in a module?

I have lots of experience programming vba in excel, but struggling to get started in Access.

Thanks.

Martin

ps. i am using access 2003

pps. can anyone recommend a book that will get into the practicalities of programming access vba.
 
Last edited:
In access you have the advantage of "bound forms" that means that your forms are directly linked to your tables, thus eliminating the need for VBA to control and do this... Unless you have a very specific need to make the forms "unbound"... I suggest you try bound forms...

"All" you do is put in a table or query as the recordsource of the form and bind the controls to said table or query. Updates to the table will then happen automagicaly.
 
Thanks for your quick reply.

I think i am using a bound form.

But I need to access more than one table. And i dont want to change records manually, i need to code to do it. Once i get up and running the code will access thousands of records, run calculations, reference other tables, and enter the results into the table.
 
Calculations should not be stored in a table in access....

If you need to do calculations you do them in a query keeping only the source data in a table.
Same for referencing other tables, this also is done in a query by 'joining' the two tables.
 

Users who are viewing this thread

Back
Top Bottom