Jul 21, 2005 #1 Cloonalt Programmer Jan 4, 2003 354 US This seems like a dumb question, but... If I use docmd.openquery(queryname) and the query returns 0 records, can I capture that result and display a message box? Thanks.
This seems like a dumb question, but... If I use docmd.openquery(queryname) and the query returns 0 records, can I capture that result and display a message box? Thanks.
Jul 21, 2005 1 #2 lewds Programmer Jul 19, 2002 144 US HI.... It is possible to obtain the count of records returned by Query using DCOUNT. Place the following in the Click Event of a command button. Fill values as needed. Dim MyCount as Double MyCount = DCOUNT("[SomeField]","YourQuery") MsgBox "There are " & MyCount & " record(s) available! Upvote 0 Downvote
HI.... It is possible to obtain the count of records returned by Query using DCOUNT. Place the following in the Click Event of a command button. Fill values as needed. Dim MyCount as Double MyCount = DCOUNT("[SomeField]","YourQuery") MsgBox "There are " & MyCount & " record(s) available!