Your expression is returning a value. You can evaluate that value using VBA. You could also manage the entire thing in VBA.
You could start by placing the following in a click event to evaluate the code.
Eventually, after you fine tune your DCount, you can do something with your variable, "intCount"Code:Dim intCount as integer intCount = DCount ("*"; "tbStudents"; "(field = '1')") msgbox intCount
Thank you ItsMe
Regarding
But I want to add anything
Is when the number 75 is to stand for the introduction of records bearing the number (1)
![]()
Azhar,
Take out the single quotes and parens in your criteria.
Good Luck!Code:= DCount ("*"; "tbStudents"; "field = 1") = DCount ("*"; "tbStudents"; "field = 2") = DCount ("*"; "tbStudents"; "field = 3") = DCount ("*"; "tbStudents"; "field = 4")
Azhar,
Can you try another translator? The statements about "add anything" and "the number 75" just don't make sense in English. I can't figure out what you need.
Personally, I don't like any D function which uses * as the returning field. Although I don't have hard evidence to support it, I'm pretty sure this is returning more data than is necessary to perform the calculation. Specify only a single field to return in your D functions. They should run faster and chew up less memory.
Other than that, I don't understand your question. May I suggest http://www.bing.com/translator
Well
Among students
In the classroom students
Each row accommodated a number of students. For example, 20 students
Rows in the school room 4
Must be in each row 20 students and stop sending additional student
Forgot
Thank you Xipooo
Website translation
Xipooo is right. If the name of your field in tbStudents really is "field", don't use reserved words.
But if that is the case, try this:Then, of course, change the name of [field] to something other than a reserved word, like NbrOfStudents.Code:= DCount ("[field]"; "tbStudents"; "[field] = 1")
Hey, is this a homework assignment?![]()
You will need to implement additional code to analyze the variable, "intCount". The message box will help you to correctly construct your DCount statement.
After you get your Dcount functioning correctly, create some code to analyze the value of your variable.
If inCount = 75 then
msgbox "No More Students Please!"
<More Code to cancel user's request>
End If
What in the world are semicolons doing in your Dcount() ??
Replace them with commas
Field is a reserved word. It is recommended to not use reserved words in names or alias'. If you are using "Field" as an alias, make sure you enclose the name in brackets. [Field]
Do you still have a question about how to accomplish your task?
Thank you Its
Yes, I'm still stuck
Are you able to get the count of records where Field = 1 and store that value in the variable intCount ?
Do you get a message box with the correct count?