R
RNUSZ@OKDPS
I have a Query named FRQ-Search-By-Case that does a left join between primary
table and secondary table based on primary key match between tables.
I determine if there are matching records with the following which works
well, but the problem is I also want to store the number of records found in
the following statement to be used for a record counter used later in the
same program.
How do I reference later the value stored in DCount, (say if the resulting
query has 5 records in it) I want to store the value of 5 in my working
record counter field for scrolling up/down through form changing records as I
go.
If DCount("*", "FRQ-Search-By-Case", "[DPS_FR_CASE_RECORDS.CASE_NUM_YR]= " &
Me.[CASE_NUM_YR_P1] & _
" And [DPS_FR_CASE_RECORDS.CASE_NUM]= " & Me.[CASE_NUM_P1]) = 0 Then
MsgBox " No Matching Records Found, Form-Current", vbOKOnly,
"Form: FRF-CR-U"
GoTo ByPass_FormCurrent_Sub
Else
MsgBox " Matching Records Found ", vbOKOnly, "Form: FRF-CR-U"
End If
Thanks in advance
table and secondary table based on primary key match between tables.
I determine if there are matching records with the following which works
well, but the problem is I also want to store the number of records found in
the following statement to be used for a record counter used later in the
same program.
How do I reference later the value stored in DCount, (say if the resulting
query has 5 records in it) I want to store the value of 5 in my working
record counter field for scrolling up/down through form changing records as I
go.
If DCount("*", "FRQ-Search-By-Case", "[DPS_FR_CASE_RECORDS.CASE_NUM_YR]= " &
Me.[CASE_NUM_YR_P1] & _
" And [DPS_FR_CASE_RECORDS.CASE_NUM]= " & Me.[CASE_NUM_P1]) = 0 Then
MsgBox " No Matching Records Found, Form-Current", vbOKOnly,
"Form: FRF-CR-U"
GoTo ByPass_FormCurrent_Sub
Else
MsgBox " Matching Records Found ", vbOKOnly, "Form: FRF-CR-U"
End If
Thanks in advance