Hi All,
I might be being really stupid here, but it's near the end of the day, and my brain just can't work it out :banghead:
Basically, for some reason, on the Form i'm using, it only shows one result back on a filter, but when I enter it create a query with the same info, if displays what I need. As the query changes each time to form is used, I'd be using filters anyway, so doing a standard filter isn't the answer, and I don't want to write a query everytime, as I know what I'm doing works, I have 4 other forms doing the exact same thing.
To code for the link I have is:
What's interesting, is intReject comes back as 2, which it should be, so why is the fitler, which is exactly the same, only giving one...?
Thanks for your help.
Kind Regards,
Thomas
[i}Just got it, totally forgot that when changing the source subform, it puts a Child link Field and Master Link Field in, even if you don't want one.[/i]
I might be being really stupid here, but it's near the end of the day, and my brain just can't work it out :banghead:
Basically, for some reason, on the Form i'm using, it only shows one result back on a filter, but when I enter it create a query with the same info, if displays what I need. As the query changes each time to form is used, I'd be using filters anyway, so doing a standard filter isn't the answer, and I don't want to write a query everytime, as I know what I'm doing works, I have 4 other forms doing the exact same thing.
To code for the link I have is:
Code:
intReject = DCount("[Refund Type]", "[tblRequest]", "[Status] = 'Rejected' AND ([Modified] = '" & Environ("username") & "' OR [Modified] = '" & strUsername & "')")
If intReject <> 0 Then
intMessage = MsgBox("You have " & intReject & " rejected request(s). Would you like to review now?", vbYesNo, "Rejected Requests")
If intMessage = 6 Then
stLinkCriteria = "([Status] = 'Rejected' AND ([Modified] = '" & Environ("username") & "' OR [Modified] = '" & strUsername & "'))"
stDocName = "frmRejectTabs"
DoCmd.OpenForm stDocName, , , stLinkCriteria
End If
End If
Thanks for your help.
Kind Regards,
Thomas
[i}Just got it, totally forgot that when changing the source subform, it puts a Child link Field and Master Link Field in, even if you don't want one.[/i]
Last edited: