Adding records by clicking on a button

  • Thread starter Thread starter hin87_at_yahoo.com
  • Start date Start date
H

hin87_at_yahoo.com

Hi,

How can I adds records from clicking a button?

Here what's I'm trying to do.

Table:
ShoppingCart: ID, Name, Price
ex: 1, forks, $4
2, spoons, $3
3, water, $1

Table:
Order: ID, ItemID, Name, Price

If I click on a button, how can I put these items into the Order table
and refresh the Order form to show the items ?


Thanks,
 
You'll Need to read up on DAO. But it Will Look
something like this

Dim Db as Database
dim rs as Recordset

set Db = CurrentDb
Set rs = db.openrecordset("YourTableName")

rs.AddNew
rs!TableNameField = CorrespondingFormField (Repeat All
Fields)
rs.Update

db = Nothing

Hope this Helps!!

Dean
 
Back
Top