G
Guest
is it possible to write code so that when you press a button on a form it
ticks a box and adds a date to a query
i came up with this: -
Private Sub Invoice_Click()
On Error GoTo Err_Command51_Click
Dim stDocName As String
stDocName = "Due to be invoced"
DoCmd.OpenQuery stDocName, acNormal, acEdit
Exit_Command51_Click:
Exit Sub
Me.[Invoice Raised] = 1
Me.[Invoice Date] = Date
Exit_Welcome_Letter_Click:
Exit Sub
Err_Command51_Click:
MsgBox Err.Description
Resume Exit_Command51_Click
End Sub
it runs and displays the query but does nothing with the tick box and date
fields, i am not very good at coding and may have made a mistake
Thanks
Phil
ticks a box and adds a date to a query
i came up with this: -
Private Sub Invoice_Click()
On Error GoTo Err_Command51_Click
Dim stDocName As String
stDocName = "Due to be invoced"
DoCmd.OpenQuery stDocName, acNormal, acEdit
Exit_Command51_Click:
Exit Sub
Me.[Invoice Raised] = 1
Me.[Invoice Date] = Date
Exit_Welcome_Letter_Click:
Exit Sub
Err_Command51_Click:
MsgBox Err.Description
Resume Exit_Command51_Click
End Sub
it runs and displays the query but does nothing with the tick box and date
fields, i am not very good at coding and may have made a mistake
Thanks
Phil