Using Code Builder To Edit a Record

DarkPhane

New member
Local time
Today, 18:07
Joined
Dec 20, 2009
Messages
2
Hey,

I'm pretty new to Access (my first database for school XD) so I'm sorry if this is a stupid question.... But can I, using code builder (hopefully using VB.net code as I am proficient with it) or other method, edit a field in a record?

Let me explain, I have three tables, each of them needs a form, which I am making. On the form there is a checkbox, I need that checkbox to set two values in two different records, one value located in the new record that the form is making and another in a separate table in an existing record.


Sorry if this wasn't clear, Ill happily explain again if it wasn't.

Phane
 
It sounds like your database is not properly normalized since you are wanting to change two different records to the same value.
 
On the form there is a checkbox, I need that checkbox to set two values in two different records, one value located in the new record that the form is making and another in a separate table in an existing record.


You would use the after update event on the checkbox and run a simple sql query.

sql = "Update yourtable set yourcolum = true where something = something"
DoCmd.runsql sql

The VBA should outherwise be fairly familiar to you
 

Users who are viewing this thread

Back
Top Bottom