I want some fields on a table to be updated using a check box

M

Maran

I have a form named Receipt_details, with the date of receipt of goods and
other details. I will update the receipts in this form (I will update the
Date of Receipt in this form). When I click a check box,which is placed
against the Date of Receipt, I want this data ( Date of Receipt) to be
updated in another table,named Stock.

Please help.Thanks
 
B

Barry Gilbert

In the after_update event of the checkbox, you'll need to do an update
of the second table.
Air code:

Private Sub chkReceipt_AfterUpdate()
Dim strSQL as String
strSQL = "Update Stock Set DateOfReceipt = #" & Me.txtDateOfReceipt
& "# WHERE blah-blah-your-key-field-info"
DoCmd.RunSql strSQL
End Sub

HTH,
Barry
 
M

Maran

hi Barry,

Thanks for the info. But, the code is not working. It shows error on the
last line.

DoCmd.RunSql strSQL

Please help.

Thanks.
 
Top