Hi,
It's a simple thing I'm trying to do and I have looked and looked
without success.
I have a table named tblMain with columns Order_ID, Price, Tax
What I want to do is: in the Form frmMain, when a user inputs a Price,
the Tax field is calculated as a percentage of the Price value and then
save it back to the table.
I want to learn to do this in VBA or SQL and so far all I have learned
to how to open a database
Dim dbsMain As Database
Dim rsNum As Recordset
Set dbsMain = OpenDatabase("C:\TEMP.mdb")
Set rsNum = _
dbsMain.OpenRecordset("tblMain")
I hope I at least got this right. It's opening a file called TEMP.mdb
located in C:\ and reading the tblMain into rsNum.
Please correct me if I am already wrong.
Can someone show me how to begin accessing the values in the rsNum?
For example, if I wanted to do a calculation to change the column Tax
in tblMain? How do I access a row? a column? or just one field at row
X, column Y?
Please help!
Thanks in advance