M
Mike Wilson
Help Please
I am using the following VB code to append a product selection to an
order detail subform (OrderD1) in Access 97 via unbound, synchronised
Combo boxes (PIDS & PNS) which pull Product Id's & Names from a
Product Table, the quantity required is then entered into text box QTYS
and the line weight is calculated in text box Wts
"Code"
Private Sub AddNew_Click()
DoCmd.RunMacro "Add1st"
Dim DB As DAO.Database
Dim RS As DAO.Recordset
Dim strSQL As String
Set DB = CurrentDb
Set RS = DB.OpenRecordset("OrderD1", dbOpenDynaset)
RS.AddNew
RS!ProductId = Me.PIDS
RS!ProductName = Me.PNS
RS!Qty = Me.QTYS
RS!Lwt = Me.Wts
RS.Update
CurrentDb.Execute "UPDATE OrderD1 SET OrderD1.Select = True;"
Me.PIDS = Null
Me.PNS = Null
Me.Lwts = Null
Me.QTYS = Null
End Sub
"Code End"
The selected product has a checkbox beside it (Select).
I want to update the checkbox for the added product, my code is setting
all the check boxes in the subform to true.
I would be grateful for any assistance
I am using the following VB code to append a product selection to an
order detail subform (OrderD1) in Access 97 via unbound, synchronised
Combo boxes (PIDS & PNS) which pull Product Id's & Names from a
Product Table, the quantity required is then entered into text box QTYS
and the line weight is calculated in text box Wts
"Code"
Private Sub AddNew_Click()
DoCmd.RunMacro "Add1st"
Dim DB As DAO.Database
Dim RS As DAO.Recordset
Dim strSQL As String
Set DB = CurrentDb
Set RS = DB.OpenRecordset("OrderD1", dbOpenDynaset)
RS.AddNew
RS!ProductId = Me.PIDS
RS!ProductName = Me.PNS
RS!Qty = Me.QTYS
RS!Lwt = Me.Wts
RS.Update
CurrentDb.Execute "UPDATE OrderD1 SET OrderD1.Select = True;"
Me.PIDS = Null
Me.PNS = Null
Me.Lwts = Null
Me.QTYS = Null
End Sub
"Code End"
The selected product has a checkbox beside it (Select).
I want to update the checkbox for the added product, my code is setting
all the check boxes in the subform to true.
I would be grateful for any assistance