pr2-eugin
Super Moderator
- Local time
- Today, 21:15
- Joined
- Nov 30, 2011
- Messages
- 8,494
This setup is for Employee attendance system. I have a continuous form setup with header, footer and details section.
Header contains one ComboBox which populates all the dates in the hoursLog table; and is used to filter the form.
Details section is based from a Query linked to the table. So edits are allowed and this reflects in the table.
Footer section contains the Sum() fields in the details section.
All works fine. The user opens the Form, default to today's date, so the hours can be updated as required. However, when the user uses the ComboBox to travel back in time. I want to render the fields uneditable. So I used a check in the FormCurrent if the ComboBox value <> Date() Then Me.AllowEdits = False. This is great, except the comboBox (unbounded) is also becoming uneditable, so I cannot go back to my original date (or) any other date for that matter.
Yes I can close and reopen the form, but this will be a pain, if the user only wants to check, if the hours have been entered right on different dates. If they need to check this, they have to close and come back several times.
The option I have is to loop through the controls and go around, but I feel there should be something very basic that I am missing. Just make the fields in the details section locked? Something of that sort? Suggestions, ideas are welcome.
Header contains one ComboBox which populates all the dates in the hoursLog table; and is used to filter the form.
Details section is based from a Query linked to the table. So edits are allowed and this reflects in the table.
Footer section contains the Sum() fields in the details section.
All works fine. The user opens the Form, default to today's date, so the hours can be updated as required. However, when the user uses the ComboBox to travel back in time. I want to render the fields uneditable. So I used a check in the FormCurrent if the ComboBox value <> Date() Then Me.AllowEdits = False. This is great, except the comboBox (unbounded) is also becoming uneditable, so I cannot go back to my original date (or) any other date for that matter.
Yes I can close and reopen the form, but this will be a pain, if the user only wants to check, if the hours have been entered right on different dates. If they need to check this, they have to close and come back several times.
The option I have is to loop through the controls and go around, but I feel there should be something very basic that I am missing. Just make the fields in the details section locked? Something of that sort? Suggestions, ideas are welcome.