J
JohnE
Hello All,
I am running into a quandry as to why the following SELECT
statement does not work.
Some background is I have a main form
(usrfrmClaimReviewAudit) that has for fields on it;
ClientCode (txt)
ClaimStyle (cbo)
StartDate (txt)
EndDate (txt)
There is also a combobox (cbxStartDate) that only provides
a listing of all the start dates for the selected client.
A listbox (lstStartDates) also graces the main form.
There is a subform (usrfrmClientReviewAuditClaims) on the
main form as well. The subform is where the claims are
entered. On the subform there are the following fields;
ClaimNumber
ClaimantName
DateOfInjury
ClaimStyleProcess
ClaimOffice
Now comes the quandry that is actually two-fold.
1) When the date is selected from cbxStartDate I need
the lstStartDates to populate with the appropriate claims
associated with the date selected. That is the following
SELECT statement. At least I'm not getting any errors.
It just doesn't populate the listbox and requeries.
2) When a claim is selected in the listbox the subform
makes the change. I tried the bookmark method but an
error occurs for this. Any suggestions would help.
Here is the language used attempting to populate the
listbox. What's wrong?
Private Sub cbxStartDate_AfterUpdate()
Forms![usrfrmClaimReviewAudit]!
[lstClaimsReviewed].RowSource = _
"SELECT " & _
"usrtblClaimReviewAuditClaims.ClaimReviewAuditC
laimsID, " & _
"usrtblClaimReviewAuditClaims.Clientcode, " & _
"usrtblClaimReviewAuditClaims.ClaimNumber, " &
_
"usrtblClaimReviewAuditClaims.StartDate " & _
"FROM usrtblClaimReviewAudit " & _
"INNER JOIN usrtblClaimReviewAuditClaims, " & _
"ON (usrtblClaimReviewAudit.ClientCode =
usrtblClaimReviewAuditClaims.ClientCode), " & _
"AND (usrtblClaimReviewAudit.StartDate =
usrtblClaimReviewAuditClaims.StartDate), " & _
"WHERE (((usrtblClaimReviewAuditClaims.Clientcode)
= [Forms]![usrfrmClaimReviewAudit]![Clientcode]), " & _
"And ((usrtblClaimReviewAuditClaims.StartDate) =
[Forms]![usrfrmClaimReviewAudit]![cbxStartDate])), " & _
"ORDER BY
usrtblClaimReviewAuditClaims.ClaimNumber;"
Me.Requery
End Sub
Thanks in advance to anyone who works on this. I am
getting frustrated over it.
*** John
I am running into a quandry as to why the following SELECT
statement does not work.
Some background is I have a main form
(usrfrmClaimReviewAudit) that has for fields on it;
ClientCode (txt)
ClaimStyle (cbo)
StartDate (txt)
EndDate (txt)
There is also a combobox (cbxStartDate) that only provides
a listing of all the start dates for the selected client.
A listbox (lstStartDates) also graces the main form.
There is a subform (usrfrmClientReviewAuditClaims) on the
main form as well. The subform is where the claims are
entered. On the subform there are the following fields;
ClaimNumber
ClaimantName
DateOfInjury
ClaimStyleProcess
ClaimOffice
Now comes the quandry that is actually two-fold.
1) When the date is selected from cbxStartDate I need
the lstStartDates to populate with the appropriate claims
associated with the date selected. That is the following
SELECT statement. At least I'm not getting any errors.
It just doesn't populate the listbox and requeries.
2) When a claim is selected in the listbox the subform
makes the change. I tried the bookmark method but an
error occurs for this. Any suggestions would help.
Here is the language used attempting to populate the
listbox. What's wrong?
Private Sub cbxStartDate_AfterUpdate()
Forms![usrfrmClaimReviewAudit]!
[lstClaimsReviewed].RowSource = _
"SELECT " & _
"usrtblClaimReviewAuditClaims.ClaimReviewAuditC
laimsID, " & _
"usrtblClaimReviewAuditClaims.Clientcode, " & _
"usrtblClaimReviewAuditClaims.ClaimNumber, " &
_
"usrtblClaimReviewAuditClaims.StartDate " & _
"FROM usrtblClaimReviewAudit " & _
"INNER JOIN usrtblClaimReviewAuditClaims, " & _
"ON (usrtblClaimReviewAudit.ClientCode =
usrtblClaimReviewAuditClaims.ClientCode), " & _
"AND (usrtblClaimReviewAudit.StartDate =
usrtblClaimReviewAuditClaims.StartDate), " & _
"WHERE (((usrtblClaimReviewAuditClaims.Clientcode)
= [Forms]![usrfrmClaimReviewAudit]![Clientcode]), " & _
"And ((usrtblClaimReviewAuditClaims.StartDate) =
[Forms]![usrfrmClaimReviewAudit]![cbxStartDate])), " & _
"ORDER BY
usrtblClaimReviewAuditClaims.ClaimNumber;"
Me.Requery
End Sub
Thanks in advance to anyone who works on this. I am
getting frustrated over it.
*** John