F
Fatz
Hi...is there a way to enable a button based on the results of a
query? I have a button on a form that when clicked opens a seperate
modal form that is connected to the ID field of a query. So this form
will only show records for that specific ID. (So I open the first
form for ID 6. From this form I have a "History" button that opens
the modal that has only the history for ID 6...)
Right now I have some code behind the On Open command that makes some
fields visible based on results in the query.
If Me![Shares Returned 1] < 1 Then
Me![Shares Returned 1].Visible = False
Else
Me![Shares Returned 1].Visible = True
End If
My problem is this: Sometimes the IDs have no history (and the users
will have no way of knowing whether an ID has history or not) so there
is no record of that particular ID in my query. Since there is no
record I get an error message ("You've entered an expression that has
no value.").
Is there a way to only have this "History" button enabled if the query
contains the specific ID that is open on the main form???
Thanks in advance to all!
-Chris
query? I have a button on a form that when clicked opens a seperate
modal form that is connected to the ID field of a query. So this form
will only show records for that specific ID. (So I open the first
form for ID 6. From this form I have a "History" button that opens
the modal that has only the history for ID 6...)
Right now I have some code behind the On Open command that makes some
fields visible based on results in the query.
If Me![Shares Returned 1] < 1 Then
Me![Shares Returned 1].Visible = False
Else
Me![Shares Returned 1].Visible = True
End If
My problem is this: Sometimes the IDs have no history (and the users
will have no way of knowing whether an ID has history or not) so there
is no record of that particular ID in my query. Since there is no
record I get an error message ("You've entered an expression that has
no value.").
Is there a way to only have this "History" button enabled if the query
contains the specific ID that is open on the main form???
Thanks in advance to all!
-Chris