Zydeceltico
Registered User.
- Local time
- Today, 17:15
- Joined
- Dec 5, 2017
- Messages
- 843
Hi All -
I have a form, frmJobDetails, where (drum roll please) details of a job are stored, added, reviewed, etc.
In other words, the form has many purposes.
This form gets called from a variety of other forms: it can be called from the main menu for reviewing job details. It can also be called from the Main Menu with a different button control to add a new job. It can also be called from an inspection form to add a new job.
When reviewing job details as opposed to adding a new job, I would like to make the "Save New Job" button invisible or at least dimmed as inactive.
Conversely, I would also like to know how to make those same buttons active and visible when opening the form as "acFormAdd" as in this code:
Is there a way to check how a form is opened and then turn controls "on" and "off" depending on the condition?
Guidance and insight - as always - is greatly appreciated.
Thanks,
Tim
I have a form, frmJobDetails, where (drum roll please) details of a job are stored, added, reviewed, etc.
In other words, the form has many purposes.
This form gets called from a variety of other forms: it can be called from the main menu for reviewing job details. It can also be called from the Main Menu with a different button control to add a new job. It can also be called from an inspection form to add a new job.
When reviewing job details as opposed to adding a new job, I would like to make the "Save New Job" button invisible or at least dimmed as inactive.
Conversely, I would also like to know how to make those same buttons active and visible when opening the form as "acFormAdd" as in this code:
Code:
Private Sub cmdSave_Click()
Dim strOpenArg As String
strOpenArg = Me.txtJobNumber & "|" & Me.txtTask & "|" & Me.txtResource
DoCmd.Close
DoCmd.OpenForm "frmJobDetails", acNormal, , , acFormAdd, acNormal, strOpenArg
End Sub
Is there a way to check how a form is opened and then turn controls "on" and "off" depending on the condition?
Guidance and insight - as always - is greatly appreciated.
Thanks,
Tim