B
Brian Langley
Afternoon folks!
I've got 2 popup forms that trigger from NotInList events. This morning, I
got the first working ok- the Add and Cancel butons add or delete the new
record properly, the form requeries the original box putting the value in
the list- it works!
Unfortunatley, when I moved the code over to the second form (after changing
all the variables/form names etc) it isn't wotking properly. Specifically,
the second form's Add button will not save the data to the table.
Following are both forms bits of code:
The one that works:
**
Private Sub AddSupplier_Click()
RunCommand acCmdClose 'close form
End Sub
Private Sub Cancel_Click()
If Me.Dirty Then
Me.Undo 'Undo edits in progress
End If
If Not Me.NewRecord Then
RunCommand acCmdDeleteRecord 'Delete new record
End If
RunCommand acCmdClose 'close form
End Sub
--
In the form's AfterUpdate event:
Forms!ApplicationDetails!Supplier.Requery 'Refresh combo box to accept new
supplier
**
And the one that doesn't:
**
Private Sub AddFundingSource_Click()
RunCommand acCmdClose 'close form
End Sub
Private Sub Cancel_Click()
If Me.Dirty Then
Me.Undo 'Undo edits in progress
End If
If Not Me.NewRecord Then
RunCommand acCmdDeleteRecord 'Delete new record
End If
RunCommand acCmdClose 'close form
End Sub
--
In the forms AfterUpdate event:
Forms!FundingDetailsEntry.Requery 'Refresh combo box to accept new funding
source
**
Any help would be most appreciated.
Cheers
Brian
I've got 2 popup forms that trigger from NotInList events. This morning, I
got the first working ok- the Add and Cancel butons add or delete the new
record properly, the form requeries the original box putting the value in
the list- it works!
Unfortunatley, when I moved the code over to the second form (after changing
all the variables/form names etc) it isn't wotking properly. Specifically,
the second form's Add button will not save the data to the table.
Following are both forms bits of code:
The one that works:
**
Private Sub AddSupplier_Click()
RunCommand acCmdClose 'close form
End Sub
Private Sub Cancel_Click()
If Me.Dirty Then
Me.Undo 'Undo edits in progress
End If
If Not Me.NewRecord Then
RunCommand acCmdDeleteRecord 'Delete new record
End If
RunCommand acCmdClose 'close form
End Sub
--
In the form's AfterUpdate event:
Forms!ApplicationDetails!Supplier.Requery 'Refresh combo box to accept new
supplier
**
And the one that doesn't:
**
Private Sub AddFundingSource_Click()
RunCommand acCmdClose 'close form
End Sub
Private Sub Cancel_Click()
If Me.Dirty Then
Me.Undo 'Undo edits in progress
End If
If Not Me.NewRecord Then
RunCommand acCmdDeleteRecord 'Delete new record
End If
RunCommand acCmdClose 'close form
End Sub
--
In the forms AfterUpdate event:
Forms!FundingDetailsEntry.Requery 'Refresh combo box to accept new funding
source
**
Any help would be most appreciated.
Cheers
Brian