G
Guest
Hi I have a main form orders and a sub form Order Details. I found this on
the forum and addapted it to work with mine.
In the event that a command button is pressed (on click) it runs the
procedure below and it sets all the values of the Goods Received check boxes
to True if they are False.
However the date to return seems to either not return a date or overwrite
previous dates depending if Null is put in place of the ????. If the field is
null I want it to return todays date, however ignore it if there is already a
date in there.
Private Sub AllGoodsReceived_Click()
With [Forms]![OrdersToshiba]![OrderDetails].[Form].RecordsetClone
.MoveFirst
Do While .EOF = False
.Edit
If ![GoodsReceived] = False Then ![GoodsReceived] = True Else
![GoodsReceived] = True
If ![GoodsReceivedDate] = ???? Then ![GoodsReceivedDate] = Date
Else ![GoodsReceivedDate] = date
.Update
.MoveNext
Loop
End With
End Sub
Can some one help me sort out the criteria?
Thanks
Andi
the forum and addapted it to work with mine.
In the event that a command button is pressed (on click) it runs the
procedure below and it sets all the values of the Goods Received check boxes
to True if they are False.
However the date to return seems to either not return a date or overwrite
previous dates depending if Null is put in place of the ????. If the field is
null I want it to return todays date, however ignore it if there is already a
date in there.
Private Sub AllGoodsReceived_Click()
With [Forms]![OrdersToshiba]![OrderDetails].[Form].RecordsetClone
.MoveFirst
Do While .EOF = False
.Edit
If ![GoodsReceived] = False Then ![GoodsReceived] = True Else
![GoodsReceived] = True
If ![GoodsReceivedDate] = ???? Then ![GoodsReceivedDate] = Date
Else ![GoodsReceivedDate] = date
.Update
.MoveNext
Loop
End With
End Sub
Can some one help me sort out the criteria?
Thanks
Andi