Originally Posted by
Zoroxeus
I want that when i chose Yes or No, somewhere in a the database, a table, the value of a field (initially empty) becomes empty...
so i tried to do something of the type:
So I know how to start (If value = Yes ) ...
but I don't know how the insert statement would work through vb ??
You could use an OnChange event sub for that control, and to execute a SQL command you would have lines like:
Code:
With DoCmd
.SetWarnings False
.RunSQL "Your SQL statement goes here"
.SetWarnings True
End With
Originally Posted by
Zoroxeus
Another question is I have a text box in a form, I want this box to display the sum of all the data from a field in my table ?
Use DSum().
=DSum("[Yourfield]", "[YourTable]", "Criteria if needed")
Or, use a SQL Statement:
=(SELECT Sum(Yourfield) FROM YourTable)