KeaganQuilty
Registered User.
- Local time
- Today, 11:52
- Joined
- Jun 28, 2001
- Messages
- 51
I have a form that is filtered by the docmd so that it only shows certain records according to date. This is the command I have used
DoCmd.OpenForm "frmFollowUp", acNormal, , "(datepart('q',[startdate]) = " & grpQuarter & " AND datepart('yyyy',[startdate]) = " & txtYear & ") OR (datepart('q',[enddate]) = " & grpQuarter & " AND datepart('yyyy',[enddate]) = " & txtYear & ")"
I'm really sorry I couldn't make that a little easier to read. The basic jist of it is that the user chooses which quarter and year they want to see, and the form is then opened based on that criteria. The problem comes when the user chooses a quarter/year for which there is no data in the underlying table.
Is there any way of preventing the form from opening if there is no data in the underlying table?
Keagan Quilty
Kilbride, Newfoundland
BTW: I'm using Access 97
DoCmd.OpenForm "frmFollowUp", acNormal, , "(datepart('q',[startdate]) = " & grpQuarter & " AND datepart('yyyy',[startdate]) = " & txtYear & ") OR (datepart('q',[enddate]) = " & grpQuarter & " AND datepart('yyyy',[enddate]) = " & txtYear & ")"
I'm really sorry I couldn't make that a little easier to read. The basic jist of it is that the user chooses which quarter and year they want to see, and the form is then opened based on that criteria. The problem comes when the user chooses a quarter/year for which there is no data in the underlying table.
Is there any way of preventing the form from opening if there is no data in the underlying table?
Keagan Quilty
Kilbride, Newfoundland
BTW: I'm using Access 97