By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,392 Members | 1,561 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,392 IT Pros & Developers. It's quick & easy.

Truble with Dcount MS Access

MGrowneyARSI
P: 90
Hello Im having some trouble with a Dcount that I am using to check to see if I want to Hide a page on a tab control or not the way it should work is if there are any records in the table with an App_ID matching the App_ID on the main form it should hide the page on the tab control else it should not hide the page the issue is that the Dcount is always returning 0 there are records in the table were the App_IDs match but for some reason it does not count these any suggestions are greatly appreciated thank in advance MJG/ARSI

MsgBox DCount("[ThreeSixty_App_ID]", "ThreeSixty_Appraisal", "[App_ID]" = [Forms]![Appraisal]![App_ID])
If DCount("[ThreeSixty_App_ID]", "ThreeSixty_Appraisal", "[App_ID]" = [Forms]![Appraisal]![App_ID]) > 0 Then
Me.Appraisal.SetFocus
Me.Select_For_360_Survey.Visible = False
Else
Me.Select_For_360_Survey.Visible = True
End If
Aug 16 '07 #1
Share this Question
Share on Google+
3 Replies


Rabbit
Expert Mod 10K+
P: 12,396
It should be inside the quotes: "[App_ID] = [Forms]![Appraisal]![App_ID]"
Aug 16 '07 #2

MGrowneyARSI
P: 90
LOl I tried every single other way of doing it from "'" & &"'" to "& " and no quotes it figures it was that simple thanks agian that works great
Aug 16 '07 #3

Rabbit
Expert Mod 10K+
P: 12,396
Not a problem, good luck.
Aug 16 '07 #4

Post your reply

Sign in to post your reply or Sign up for a free account.