M
mdavis via AccessMonster.com
I have the following code in a list box's After Update event and on the forms
On Current event.
If IsNull(Listbox) Or Listbox = "" Then
AddButtonMotif.Enabled = True
EditButtonMotif.Enabled = False
Else
AddButtonMotif.Enabled = False
EditButtonMotif.Enabled = True
End If
The list box is based on a query and is unbound. What I want to happen is if
there is not a value in the Listbox I would like the Add button to be enabled.
Then the user can click and a pop up form will open for them to enter a new
value. After they enter the new value and return to the main form I would
like the Add button to be disabled and the Edit button to be enabled. When
the user clicks the Edit button and the pop up form opens and the user
decides to delete the value and then they return to the main form I would
like the Add Button enabled again and the Edit button disabled.
For some reason this doesn't want to work. If I have a value
in the Listbox the Add button is still enabled and the Edit button is
disabled.
Thank you in advance.
On Current event.
If IsNull(Listbox) Or Listbox = "" Then
AddButtonMotif.Enabled = True
EditButtonMotif.Enabled = False
Else
AddButtonMotif.Enabled = False
EditButtonMotif.Enabled = True
End If
The list box is based on a query and is unbound. What I want to happen is if
there is not a value in the Listbox I would like the Add button to be enabled.
Then the user can click and a pop up form will open for them to enter a new
value. After they enter the new value and return to the main form I would
like the Add button to be disabled and the Edit button to be enabled. When
the user clicks the Edit button and the pop up form opens and the user
decides to delete the value and then they return to the main form I would
like the Add Button enabled again and the Edit button disabled.
For some reason this doesn't want to work. If I have a value
in the Listbox the Add button is still enabled and the Edit button is
disabled.
Thank you in advance.