Jul 21, 2005 #1 Cloonalt Programmer Joined Jan 4, 2003 Messages 354 Location 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 Joined Jul 19, 2002 Messages 144 Location 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!
Jul 21, 2005 Thread starter #3 Cloonalt Programmer Joined Jan 4, 2003 Messages 354 Location US Thanks Upvote 0 Downvote