Entering data via a form - viewing an associated query record count?

peskywinnets

Registered User.
Local time
Today, 04:34
Joined
Feb 4, 2014
Messages
578
So I'm using a form to update a table....in turn there's a query that references this table.....what I need to be able to do, is - as the user is entering a new record to the table via the form - that the record count from the follow query is presented back to him

Here's the flow...

Form -> table1 -> query1 ....... user sees the quury 1 record count in the form view he is in.

doable?
 
A DCount() would be one method.
 
The arrows in your question are confusing.

Is the form bound to a table and then your question relates to a separate query? Or is the form bound to a query that is then bound to your table? Because your words and your arrows don't seem to say the same thing.

Paul's answer (DCount) is correct either way, but my question is, a DCount of what entity? If the query has a WHERE clause then the number of records condoned by the query don't necessarily match the table's actual population. A DCount would work for either one. Just be sure that you know which entity you want to count.

Also, if there is a bound form, there will be a Form_AfterUpdate event available to you, and there will also be a Form_Current event. Either of those two events would be the right place for the DCount to be employed. I believe that the AfterUpdate event would fire first, then the Current event.
 
Thanks for the replies & apologies for the delay (& the confusion)

My form inputs data to a single table.

But I have a query of interest which pulls in data from several tables (one of these being the table my form inputs data to mentioned above)...this query has multiple criteria set.

Therefore I seek a 'record count' of the query visible to the user as he enters data via the form.

Since I am quite new to forms, I guess my question relates to the mechanics of how to show the 'record count' of a query (that updates each time after the user inputs data to a table).
 
Try a textbox with a control source of:

=DCount("*", "QueryName")
 
You can also set the NavigationButtons property of the form to true, and then you get navigation buttons, record number, count of records, and an add button (if the query supports new records).
 
MarkK must not have read post 4. ;)
 
Nope, I definitely did not read post #4 :o
Go with the DCount() :)
 
Last edited:
Set its Tab Stop property to No.
 
Sure it is...once you know it's there. :p
 

Users who are viewing this thread

Back
Top Bottom