Open a form based on query contents

  • Thread starter Thread starter Mahmood
  • Start date Start date
M

Mahmood

I have a form (FrmNewNotes) based on a query (QryNewNotes)which
determins if any new notes have been made since a user last vewied the
database. If there are new notes the query is populated otherwise it's
empty.

I would like to open frmNewNotes without any user input after the main
menu has loaded (perhaps on the OnActive event), but only if there are
new notes to be viewed.

Any suggestion/ideas on how to best do this.

My thanks in advance.

Ps I'm running access2K
 
Mahmood said:
I have a form (FrmNewNotes) based on a query (QryNewNotes)which
determins if any new notes have been made since a user last vewied the
database. If there are new notes the query is populated otherwise it's
empty.

I would like to open frmNewNotes without any user input after the main
menu has loaded (perhaps on the OnActive event), but only if there are
new notes to be viewed.

Any suggestion/ideas on how to best do this.

My thanks in advance.

Ps I'm running access2K

You might try just using DCount on the query to see if there are any
records, before opening the form:

If DCount("*", "QryNewNotes") > 0 Then
DoCmd.OpenForm "FrmNewNotes"
End If

If the query takes a long time to run, this might not be the best
solution, but otherwise it should get the job done.
 
Back
Top