Yes, you can enter data by using VBA code to create. The specifics are a little tricky and it all depends upon what you want to do. but, the following is an example of being able to update a field on just certain records in a table.
dim db as DAO.Database
dim rs as DAO.Recordset
Set db = currentdb
set rs = db.Openrecordset("tblCustomers", dbOpendynaset)
rs.movefirst
Do
If rs("CustCity" = "Detroit" then
rs.edit
rs("State" = "Michigan"
rs.update
end if
rs.movenext
loop until rs.eof
rs.close
db.close
This code above will search through the table tblCustomers and find all records where the Customer City is Detroit and update the State field to Michigan.
If you can give me more specifics about what you want to do I can probably help you with that specific issue.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.