H
hermanko
Hi,
On a form based on a query, I have a textbox with DCount function to
display the number of records in the underlying query. The form
displays all the records with a duplicate field "Fund Name". I have a
command button that triggers an action query ,however I want to have
that command button disabled IF the form displays zero records. In this
case, the user can only click on Cancel to go back. If there are
presently records then that button should be enabled. My event
procedure is:
If IsNull(Me!txt_dupcount3) Then
Me!cmd_remove3.Enabled = False
Else
Me!cmd_remove3.Enabled = True
End If
where txt_dupcount3 is the name of the textbox containing my DCount
function, and cmd_remove3 is my button.
I also a Yes/No field with checkboxes. My other approach would be to
have the form load with the button already disabled by default....and
once any ONE checkbox is selected it will enable the button (implying
that there are existing records displayed).
If possible, can someone help me please with either approach? Thanks!!
Herman
On a form based on a query, I have a textbox with DCount function to
display the number of records in the underlying query. The form
displays all the records with a duplicate field "Fund Name". I have a
command button that triggers an action query ,however I want to have
that command button disabled IF the form displays zero records. In this
case, the user can only click on Cancel to go back. If there are
presently records then that button should be enabled. My event
procedure is:
If IsNull(Me!txt_dupcount3) Then
Me!cmd_remove3.Enabled = False
Else
Me!cmd_remove3.Enabled = True
End If
where txt_dupcount3 is the name of the textbox containing my DCount
function, and cmd_remove3 is my button.
I also a Yes/No field with checkboxes. My other approach would be to
have the form load with the button already disabled by default....and
once any ONE checkbox is selected it will enable the button (implying
that there are existing records displayed).
If possible, can someone help me please with either approach? Thanks!!
Herman