Hey Everyone,
I have continuous form bound to a table called [INVOICE_APPROVER]. This form serves as a rough draft for recording data on invoices. Once data is completed and invoices have been approved I have a button that appends the data to the final invoice table, where it is then deducted from the budget table and everything else.
This works great, however I need to put some control on the button so entries are not duplicated on multiple button presses.
Here is what I have tried so far:
I have the INVOICE_ENTRY command in the continuous for run the query and disable using this code:
Private Sub INVOICE_ENTRY_Click()
DoCmd.SetWarnings False
DoCmd.OpenQuery "INVOICE_ENTRY"
DoCmd.SetWarnings True
Me.PR.SetFocus
Me.INVOICE_ENTRY.Enabled = False
Me.Repaint
End Sub
This works, but since a continuous form it disables all the buttons... can't have that.
I then tried adding another step by having the INVOICE_ENTRY command open an unbound single form, setting default values to the original INVOICE_APPROVER form, and placing a ADD_ENTRY button in the Footer. I used the same code as above adapted for this new form. This works as well, however when I close the form and click the INVOICE_ENTRY command on the continuous for the ADD_ENTRY command is no longer disabled.
I think I'm out of ideas, and I know this is a lot of work for something that could just be bound to the original invoice table, however doing it this way is somewhat necessary.
Any help is appreciated.
Thanks,
Matt