I have a command button on a form which has a query as its record source. The query comes from a table that has a number field as its key field. The name of the field in the table is "JobN" and there is a field on the form named "txtJobN" which has the key table field as its control source.
The command button by default is not visible. But I want it to become visible if there is a like entry in a second table. This second table has a key field identical to the key field in the 1st table. What would the code be for the onopen (or would it be oncurrent?) event of the form?
Then, when the command button becomes visible and is clicked, I want a form to open to display the record in the second table.
What is my onclick event for the command button?