i have a tbl that stores items that have an expiry. in a child table i want to store the expiry. but as it is different for each item i need a way of doing this.
i thought that by having
DateAdd('m',3,Date()) in one of the fields this would work.
on click event i would like the date add to come into play but the way i am doing it comes up with an error. too few arguments.
this is what i have so far
this is the part that has the DateAdd
rs![DateExpiry] = [Forms]![frmClientSale-AddCourse]![lstCoursesAvailable].Column(5)
any ideas how i can do this?
i thought that by having
DateAdd('m',3,Date()) in one of the fields this would work.
on click event i would like the date add to come into play but the way i am doing it comes up with an error. too few arguments.
this is what i have so far
Code:
Dim rs As DAO.Recordset
Dim db As DAO.Database
Set db = CurrentDb
Set rs = db.OpenRecordset("tblClientCourse", dbOpenDynaset)
rs.AddNew
rs![OrdersItemsID] = [Forms]![frmClientSale-AddCourse]![OrdersItemsID]
rs![ClientID] = [Forms]![frmClientSale]![ClientDetailsID]
rs![CourseID] = [Forms]![frmClientSale-AddCourse]![txtCourseID]
rs![ItemsRemaining] = [Forms]![frmClientSale-AddCourse]![txtItemsRemaining]
rs![OrderID] = [Forms]![frmClientSale-AddCourse]![OrderID]
rs![DateExpiry] = [Forms]![frmClientSale-AddCourse]![lstCoursesAvailable].Column(5)
rs.Update
rs.Close
db.Close
this is the part that has the DateAdd
rs![DateExpiry] = [Forms]![frmClientSale-AddCourse]![lstCoursesAvailable].Column(5)
any ideas how i can do this?