Updating records in ms access
Is it possible to add a record in one table and have Access automatically add date from one of the fields into another table??
In more detail: Table1 has the following fields: Product_ID, Price, Weight etc...
How hard is On Error Resume Next Const ad Open Static = 3 Const ad Lock Optimistic = 3 Set obj Connection = Create Object("ADODB. Open "SELECT * FROM General Properties" , _ obj Connection, ad Open Static, ad Lock Optimistic str Criteria = "Computer Name = 'atl-ws-99'" obj Record Set. As we said, there are other ways we can modify existing records; however, those will have to wait for another day. Let’s put it this way: the next time we’re too lazy to think up a brand-new topic for this column, well, you can probably figure out for yourself what the topic will be.
(At the moment, all the work we’re doing is taking place solely in memory.) We then have a series of lines that assign values to the individual fields for this new record.
In the lazy spirit of the day, we’re taking the easy way out. OLEDB.4.0; " & _ "Data Source = c:\scripts\inventory.mdb" obj Record Set.
Const ad Open Static = 3 Const ad Lock Optimistic = 3 Set obj Connection = Create Object("ADODB. Add New obj Record Set("Computer Name") = "atl-ws-99" obj Record Set("Department") = "Human Resources" obj Record Set("Operating System") = "Microsoft Windows XP Professional" obj Record Set("Owner") = "Ken Myer" obj Record Set.
Today we’re going to take the next logical step and show you how you can add records to an Access database.
And then, just for the heck of it, we’ll take step and show you how to modify existing records as well.
OK, we admit it: we didn’t exactly knock ourselves out trying to come up with a brand-new topic for this week’s column.