J
Jeff C
I have a form bound to a table with records based on a date. I have an
unbound text box tied to a calendar form. The GotFocus event runs SQL that
appends the chosen date to the table.
I then move to a combo box to select the date I want to work with, or I can
just begin by choosing a date in the combo box. Basically what I am doing is
using the form to hold command buttons for stepping through a process. On
each button the process runs, a check box for each step is changed to yes,
and the form is refreshed making the checkbox change visible on the form.
I have two problems. First, after I have run through several steps, if I
return to the combo box to choose a different date record, the record does
not change to the current date chosen. The afterupdate event hold the code to
associate the records in the table to the value in the combo box which will
work initially. I also added code to refresh the form data after that. It
still will not work.
Here is the afterupdate event:
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "[PayrollRegisterDate] = #" & Format(Me![RegisterDate],
"mm\/dd\/yyyy") & "#"
If Not rs.EOF Then Me.Bookmark = rs.Bookmark
DoCmd.DoMenuItem acFormBar, acRecordsMenu, 5, , acMenuVer70
The second problem. Is there a way to make these check boxes uneditable on
the form so that clicking them does nothing, I do not want them accidently
changed from no to yes or visa-versa?
Thank you.
unbound text box tied to a calendar form. The GotFocus event runs SQL that
appends the chosen date to the table.
I then move to a combo box to select the date I want to work with, or I can
just begin by choosing a date in the combo box. Basically what I am doing is
using the form to hold command buttons for stepping through a process. On
each button the process runs, a check box for each step is changed to yes,
and the form is refreshed making the checkbox change visible on the form.
I have two problems. First, after I have run through several steps, if I
return to the combo box to choose a different date record, the record does
not change to the current date chosen. The afterupdate event hold the code to
associate the records in the table to the value in the combo box which will
work initially. I also added code to refresh the form data after that. It
still will not work.
Here is the afterupdate event:
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "[PayrollRegisterDate] = #" & Format(Me![RegisterDate],
"mm\/dd\/yyyy") & "#"
If Not rs.EOF Then Me.Bookmark = rs.Bookmark
DoCmd.DoMenuItem acFormBar, acRecordsMenu, 5, , acMenuVer70
The second problem. Is there a way to make these check boxes uneditable on
the form so that clicking them does nothing, I do not want them accidently
changed from no to yes or visa-versa?
Thank you.