Can commas be added to Dcount? (1 Viewer)

Megaduck

Member
Local time
Today, 15:51
Joined
Apr 24, 2020
Messages
30
I have several dcount functions on the bottom bar of my database. I am curious if you can separate records in the thousands by comma or not?

Annotation 2020-06-20 091053.jpg


For clarification, instead of "1541," it would read "1,541." Is this possible at all or would it just create an error?

Thanks!
 

Attachments

  • Annotation 2020-06-20 091053.jpg
    Annotation 2020-06-20 091053.jpg
    10 KB · Views: 85

cheekybuddha

AWF VIP
Local time
Today, 19:51
Joined
Jul 21, 2014
Messages
2,237
Don't mess with the DCount() formula, just change the formatting of the textbox control to:
General Number

If that doesn't do it, you can set the format explicitly:
#,###

hth,

d
 

Megaduck

Member
Local time
Today, 15:51
Joined
Apr 24, 2020
Messages
30
Don't mess with the DCount() formula, just change the formatting of the textbox control to:
General Number

If that doesn't do it, you can set the format explicitly:
#,###

hth,

d
Setting the format explicitly worked. Thank you!
 

namliam

The Mailman - AWF VIP
Local time
Today, 20:51
Joined
Aug 11, 2003
Messages
11,696
4 dcounts, that is 4 seperate queries... from a performance point of view a bad situation.
Instead you are better off running just one query and perhaps even binding that query to your form to display... this will perform significantly better....

Overall any D function is a bad idea and a bad habbit that you should try to stay away from as even a single query is better and more detailed and generaly faster than most D functions.... and certainly 1 query will beat 4 Dcounts.
 

Megaduck

Member
Local time
Today, 15:51
Joined
Apr 24, 2020
Messages
30
4 dcounts, that is 4 seperate queries... from a performance point of view a bad situation.
Instead you are better off running just one query and perhaps even binding that query to your form to display... this will perform significantly better....

Overall any D function is a bad idea and a bad habbit that you should try to stay away from as even a single query is better and more detailed and generaly faster than most D functions.... and certainly 1 query will beat 4 Dcounts.

I haven't seen any noticeable performance issues from it, given the database is pretty simple. Not a lot going on really. But, it definitely makes sense and I will look into trying this, if for no other reason than to learn. Appreciate it.
 

Users who are viewing this thread

Top Bottom