action based on query results

J

JRD

I am new to Access and would like to query a table and based on the query,
either open a form to add new data (in the case when the query returns no
values) or display the information in a different form.

I know nothing about SQL.

Also, how do I perform these actions without displaying the query results in
its own window?
 
M

Michel Walsh

Hi,

Basically, SQL is implied when retrieving the data, or its organization,
is implied. Otherwise, other language, like VBA (for Jet) or C# could be
(for next MS SQL Server version).


If 0=DCount("*", "SavedQueryHere") then
... do something if there is no data
Else
... do something where there is data
End If



To open a form, someone can use DoCmd.OpenForm ...


Hoping it may help,
Vanderghast, Access MVP
 
Top