A
Aria
Hi,
I’m hoping someone can help me fix my form. I don't know if this is the
right section to post my question. It was working fine until I made a change
yesterday. I didn’t know there was a problem until I tried to update some
records. The form is frmKeyRequests. With help from those in this newsgroup,
I was able to get the form displaying information and working as I would
like. Yesterday, I created a back-up copy and added 2 combo boxes to restrict
records by semester and year. I then did a C & R on the db. No problems were
encountered. I don’t know if this has anything to do with it or not but like
I said it was working until I added the combo boxes (although I didn’t test
it by adding a new date to the text box). What’s happening is that I can’t
input a date into txtRcvdDate. I went back to the previous version w/o the
combo boxes and it works fine. I don’t know exactly what information you’ll
need so I’ll try to describe the form. I apologize in advance for the length
of this post.
Form Design:
Form with 2 subforms
sfrmKeyRequestsNew and sfrmKeyRequestsExisting
Newly added:
cboSemester (unbound)
Row Source Type Value List
Row Source Spring;1/1/;5/31/;Summer;6/1/;8/31/;Fall;9/1/;12/31/
Bound Column 1 Column Count 3
Column Widths 1";0";0"
cboYear (unbound)
Row Source Type Table/Query
Row Source
SELECT tblYears.Year FROM tblYears WHERE (((tblYears.Year)<=Year(Date())));
SQL (qryKeyRequests):
SELECT tblKeysRequests.RequestID, tblKeysRequests.KeyID,
tblKeysRequests.EmpID, tblKeysRequests.RqstDate,
tblKeysRequests.QtyRequested, tblKeysRequests.RcvdDate,
tblKeysRequests.QtyRecd, tblKeysRequests.Reason, tblKeysRequests.Complete,
tblKeys.KeyCode, IIf(IsNull([RcvdDate]),"Pending",[RcvdDate]) AS Pending
FROM tblKeys INNER JOIN tblKeysRequests ON tblKeys.KeyID =
tblKeysRequests.KeyID
WHERE (((tblKeysRequests.RqstDate) Between
[forms]![frmMain]![frmKeyRequests].[form]![txtRqstStartDate] And
[forms]![frmMain]![frmKeyRequests].[form]![txtRqstEndDate]))
ORDER BY tblKeys.KeyCode;
FrmKeyRequest:
Private Sub Form_GotFocus()
On Error GoTo HandleError
Me.txtRcvdDate.SetFocus
exit_procedure:
Exit Sub
HandleError:
ErrorHandler Err.Number, Err.Description, "frmKeyRequests",
"txtPending_GotFocus"
Resume exit_procedure
End Sub
sfrmKeyRequestsNew
Private Sub Form_AfterUpdate()
On Error GoTo HandleError
Forms!frmMain!frmKeyRequests.Form!sfrmKeyRequestsExisting.Requery
exit_procedure:
Exit Sub
HandleError:
ErrorHandler Err.Number, Err.Description, "frmKeyRequests",
"Form_AfterUpdate"
Resume exit_procedure
End Sub
It’s always something. I would really appreciate any assistance you can
provide. Let me know if I have failed to mention something you need to know.
I’m hoping someone can help me fix my form. I don't know if this is the
right section to post my question. It was working fine until I made a change
yesterday. I didn’t know there was a problem until I tried to update some
records. The form is frmKeyRequests. With help from those in this newsgroup,
I was able to get the form displaying information and working as I would
like. Yesterday, I created a back-up copy and added 2 combo boxes to restrict
records by semester and year. I then did a C & R on the db. No problems were
encountered. I don’t know if this has anything to do with it or not but like
I said it was working until I added the combo boxes (although I didn’t test
it by adding a new date to the text box). What’s happening is that I can’t
input a date into txtRcvdDate. I went back to the previous version w/o the
combo boxes and it works fine. I don’t know exactly what information you’ll
need so I’ll try to describe the form. I apologize in advance for the length
of this post.
Form Design:
Form with 2 subforms
sfrmKeyRequestsNew and sfrmKeyRequestsExisting
Newly added:
cboSemester (unbound)
Row Source Type Value List
Row Source Spring;1/1/;5/31/;Summer;6/1/;8/31/;Fall;9/1/;12/31/
Bound Column 1 Column Count 3
Column Widths 1";0";0"
cboYear (unbound)
Row Source Type Table/Query
Row Source
SELECT tblYears.Year FROM tblYears WHERE (((tblYears.Year)<=Year(Date())));
SQL (qryKeyRequests):
SELECT tblKeysRequests.RequestID, tblKeysRequests.KeyID,
tblKeysRequests.EmpID, tblKeysRequests.RqstDate,
tblKeysRequests.QtyRequested, tblKeysRequests.RcvdDate,
tblKeysRequests.QtyRecd, tblKeysRequests.Reason, tblKeysRequests.Complete,
tblKeys.KeyCode, IIf(IsNull([RcvdDate]),"Pending",[RcvdDate]) AS Pending
FROM tblKeys INNER JOIN tblKeysRequests ON tblKeys.KeyID =
tblKeysRequests.KeyID
WHERE (((tblKeysRequests.RqstDate) Between
[forms]![frmMain]![frmKeyRequests].[form]![txtRqstStartDate] And
[forms]![frmMain]![frmKeyRequests].[form]![txtRqstEndDate]))
ORDER BY tblKeys.KeyCode;
FrmKeyRequest:
Private Sub Form_GotFocus()
On Error GoTo HandleError
Me.txtRcvdDate.SetFocus
exit_procedure:
Exit Sub
HandleError:
ErrorHandler Err.Number, Err.Description, "frmKeyRequests",
"txtPending_GotFocus"
Resume exit_procedure
End Sub
sfrmKeyRequestsNew
Private Sub Form_AfterUpdate()
On Error GoTo HandleError
Forms!frmMain!frmKeyRequests.Form!sfrmKeyRequestsExisting.Requery
exit_procedure:
Exit Sub
HandleError:
ErrorHandler Err.Number, Err.Description, "frmKeyRequests",
"Form_AfterUpdate"
Resume exit_procedure
End Sub
It’s always something. I would really appreciate any assistance you can
provide. Let me know if I have failed to mention something you need to know.